Tengo un problema en el que las fórmulas devuelven valores nulos.
La tabla sin procesar son los datos sin procesar y hay una tabla de especificaciones, que se utiliza para determinar si los datos sin procesar pasan o fallan de acuerdo con la tabla de especificaciones. He escrito un JSL, por favor ayúdame a ver cuál es el problema, gracias.
Names Default To Here( 1 );
//raw data
dt = Data Table( "raw data001" );
dt1 = dt << subset( all rows, all columns );
//spec table
dtbz = Data Table( "Spec" );
LSL = dtbz[0, 4];
USL = dtbz[0, 5];
dtbz << New Column( "combine", formula( :Project || :Item ) );
// Create separate judgment columns for the columns to be judged
items = Design( dtbz:Item << get values(), <<LEVELS> 0,
dtbz:USL[Loc( dtbz:combine << get as matrix(), "A" || it )[1]] <= Column( dt1, items[i] ) <= dtbz:USL[
Loc( dtbz:combine << get as matrix(), "A" || it )[1]],
:Project == "B" & N Items( Loc( dtbz:combine << get as matrix(), "B" || it ) ) > 0,
dtbz:USL[Loc( dtbz:combine << get as matrix(), "B" || it )[1]] <= Column( dt1, items[i] ) <= dtbz:USL[
Loc( dtbz:combine << get as matrix(), "B" || it )[1]],
:Project == "C" & N Items( Loc( dtbz:combine << get as matrix(), "C" || it ) ) > 0,
dtbz:USL[Loc( dtbz:combine << get as matrix(), "C" || it )[1]] <= Column( dt1, items[i] ) <= dtbz:USL[
Loc( dtbz:combine << get as matrix(), "C" || it )[1]],
:Project == "D" & N Items( Loc( dtbz:combine << get as matrix(), "D" || it ) ) > 0,
dtbz:USL[Loc( dtbz:combine << get as matrix(), "D" || it )[1]] <= Column( dt1, items[i] ) <= dtbz:USL[
Loc( dtbz:combine << get as matrix(), "D" || it )[1]],
)
)
)
);</LEVELS>