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(), .))]
)
-Jarmo