How can I Count no of fail and pass by Lot to calculate yield. I want to do this using formula. (Tabulate function is working just fine. But I like to know how to do that using formula)
Select Lot as "Group By" variable (right click on this column, and you'll find this option after "new formula column"), and then right-click on "Result" column, "Group By" and then choose "Count".
This will "count" the non-missing entries.
edit: "count?"JMP can only count Number - not Strings.... at least bast on the available options in the right-click-menu.
From JMP19 onwards, JMP can also count unique Strings:
But still: no 1-click-appraoch to count strings.https://community.jmp.com/t5/Discussions/Collection-of-quot-funny-quot-Jmp-newbie-questions/m-p/910592/highlight/true#M106966
You can use Tabulate:
Drag lot onto the vertical axis and Result onto the header. Then drag Row% onto the main drop zone.In Column "Pass", you can read the yield in %.
Tabulate( Add Table( Column Table( Grouping Columns( :Result ), Add Aggregate Statistics( :Result ), Statistics( Row % ) ), Row Table( Grouping Columns( :Lot ), Add Aggregate Statistics( :Lot ) ) ) );
to calculate the yield via a column formula, you can use:
New Column( "yield_", Format( "Percent", 9, 2 ), Formula( Col Sum( :Result == "Pass", :Lot ) / Col Number( 1, :Lot ) ) )