It seems an easy question but I'm struggling to solve it...
I have this kind of data table :

It goes until 64 which is the parameter "dim" in my script.
I'm looking for the maximum and minimum of all median_range_mm 1, 2 , 3 ... until 64. But I don't want JMP to look at rows where target_status is different of 5 or 9.
As you can see, when target status is 10 it overranges at 39996.
It is easier to understand with my code :
maxValueVar = 0 ;
maxValue = Max( :median_range_mm [dt << get rows where( :target_status == 5 | :target_status == 9 ) ] );
minValue = Min( :median_range_mm[dt << get rows where( :target_status == 5 | :target_status == 9 )] );
For( p = 2, p <= dim, p++,
name = Column(dt, "target_status " || Char( p ));
nom = Column(dt, "median_range_mm " || Char( p )); // browse every columns of median_range_mm
MaxValueVar = Col Max( nom [dt << get rows where ( name == 5 | name == 9 )] );
If(
maxValueVar > maxValue, maxValue = maxValueVar,
minValueVar < minValue, minValue = minValueVar
);
);
Notice that It works for the first column that I didn't parametered. Also It works if I comment
[dt << get rows where ( name == 5 | name == 9 )]
Any idea of how "get rows where" or "column max () " work ?
Thanks