I am not sure if this is even possible. I am trying to add final result column. In that I want to output first failure mode. Also if device pass in a retest I need pass as a result.
Is it possible that SN is retested from good to bad?
Edit:
Going with the assumption of no
Names Default To Here(1); dt = Open("$DOWNLOADS/Sample1.jmp"); dt << new column("OK", Character, Nominal, Formula( If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(:SN, :Run), "Pass" , :Bin[Col Min(If(:Bin != "Pass", Row(), .))]; ); )); dt = Open("$DOWNLOADS/Sample2.jmp"); dt << new column("OK", Character, Nominal, Formula( If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(:SN, :Run), "Pass" , :Bin[Col Min(If(:Bin != "Pass", Row(), .))]; ); )); Write();
This will create "OK" column for you from which you can get the formula
If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(:SN, :Run), "Pass", :Bin[Col Min(If(:Bin != "Pass", Row(), .))] )
Yes, you are right. It should not be possible. But it is possible because of tester error or instrument with poor GRR. Chances are really low and we can ignore that possibility for now.
Solution you gave did work for the given example. But when I applied it to with multiple SN, It did not worked.
It might be enough if you add :SN to the result and modify Col Number slightly (or even better change it to col sum of one)
If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(1, :SN, :Run), "Pass" , :Bin[Col Min(If(:Bin != "Pass", Row(), .), :SN)] )