Conditional Pass/Fail based on limitHi guys,
Similar to one of previous posts, I have the following problem as shown as below:
In this case, if any of the result is >=15 in at least two sub_rad then it is consider Fail otherwise will be regarded as a Pass(as shown in the Pass_Fail col). Currently I'm using Formula but only know how to do it in a single sub_rad. Kindly suggest how can I do it with a script or formula.
Thank you.
| ID | test_id | test_type | main_rad | sub_rad | result | Pass_Fail |
| M101XS | 566 | 31 | 2 | 0 | 15 | Fail |
| M101XS | 566 | 31 | 2 | 1 | 16 | Fail |
| M101XS | 566 | 31 | 2 | 2 | 11 | Pass |
| M101XS | 566 | 31 | 3 | 0 | 12 | Pass |
| M101XS | 566 | 31 | 3 | 1 | 13 | Pass |
| M101XS | 566 | 31 | 3 | 2 | 14 | Pass |
| M101XW | 568 | 33 | 2 | 0 | 12 | Pass |
| M101XW | 568 | 33 | 2 | 1 | 16 | Pass |
| M101XW | 568 | 33 | 2 | 2 | 12 | Pass |
| M101XW | 568 | 33 | 2 | 0 | 12 | Pass |
| M101XW | 568 | 33 | 3 | 1 | 18 | Fail |
| M101XW | 568 | 33 | 3 | 2 | 20 | Fail |
Re: Conditional Pass/Fail based on limitSorry Cam, I didn't explain properly in the post. In this case, I am actually looking for at least 2 sub_rad that failed as my criteria hence that particular ID is consider failed. If the row 3 is out of spec then it is a failed as well otherwise I still regard it as a Pass. If I look at the overall (based on ID and result from sub_rad), then that particular ID is failed.
Hope it did not sound confusing to you
Thank you.
Re: Conditional Pass/Fail based on limitThis is a guess on what you want......not sure all of the conditions are properly being checked on
This is a formula.....not open JSL code
dt = Current Data Table();
holdID = :ID;
holdtest_id = :test_id;
holdmain_rad = :main_rad;
numGE15 = N Rows(
dt << get rows where(
holdID == :ID & holdtest_id == :test_id & holdmain_rad ==
:main_rad & :result >= 15
)
);
If( :result >= 15 & numGE15 >= 2,
"Fail",
"Pass"
);

Re: Conditional Pass/Fail based on limitIt's not clear what group of runs is being sentenced as pass or fail. I would think it would be all the sub_rads within the same main_rad & test ID, but that's not what the Pass_Fail column shows, otherwise row 3 would also be a fail. Can you please clarify?