How can I add final test result column with one exception mention below.
I apologize for asking same type of question over and over.
Thanks you
Here is the formula I came up with. Make sure you study it, and understand it. If you have questions about it, please get back to the Community for clarification.
If( Col Max( Col Sum( :Result == "Pass", :SN, :Run ), :SN ) == Col Number( 1, :SN, :Run ), val = "Pass", val = :Result[Col Min( If( :Result != "Pass" & :Final test check == 1, Row(), . ), :SN )]; If( val == "Bin10" & Col Sum( :Result == "Bin3", :SN ), val = "Bin3" ); ); val;
See if this speeds things up.
This is not a formula, it is a JMP script.
Open a new JMP Script window, and paste the below script into the window.
Open your data table to be processed or if already open, just click on it to make it the current data table.
Go back to the script window, and run the script.
It will create a new column in the current data table.
Names Default To Here( 1 ); dt = Current Data Table(); dt << New Column( "theRow", set each value( Row() ) ); Wait( 0 ); dts = dt << Subset( invisible, By( :SN ), All rows, Selected columns only( 0 ), selected columns( 0 ) ); For Each( {d}, dts, d << New Column( "calculated wanted column", character, formula( If( Col Max( Col Sum( :Result == "Pass", :Run ) ) == Col Number( 1 ), val = "Pass", val = :Result[Col Min( If( :Result != "Pass" & :Final test check == 1, Row(), . ), :SN )]; If( val == "Bin10" & Col Sum( :Result == "Bin3" ), val = "Bin3" ); ); val; ) ); dt << Update( With( d ), Match Columns( :theRow = :theRow ), Replace Columns in Main Table( :calculated wanted column ) ); Close( d, nosave ); );<BR />dt << delete columns(theRow);
Thanks Jim,
This works perfectly fine for small set of data. When I used this on my actual data (4000 rows) it is taking forever to execute. Is there any way to make it faster?
It is much faster.