The JSL as written only returns the first matching row's value. While
dt << get rows where( :TestStage == Stage & :label == "LSL" )
returns a matrix of all of the matching rows found, When the subscript of [1] is added
(dt << get rows where( :TestStage == Stage & :label == "LSL" ))[1]
it returns the row number of just the first row found, which in your example, returns a missing value.
@jthi Jarmo, suggests adding a further clarification to eliminate missing values, which would change your Get Rows Where() to
(dt << get rows where( :TestStage == Stage & :label == "LSL" & !IsMissing(Column(dt, resCol) ) )[1]
This is a fine solution, if you are just looking for the first non missing value. However, if your data may contain multiple rows of non missing LSL values, then you may not want the first non missing value found. You may want to do something like find the Max USL value, or the Mean USL value from all of the non missing rows returned. You could do something like
theUSL = dt << get rows where( :TestStage == Stage & :label == "LSL" & !Is Missing( Column( dt, resCol ) ) );
USLMat = [];
For Each( {foundRow, index}, theUSL, USLMat = USLMat || Column( dt, resCol )[index] );
theUSL = Mean( USLMat );
Jim