Hi all,
I'm currently trying to write a script that will automatically calculate yields of tests across temperatures. I've replaced all "Pass" with 1's and "Fail" with a 0 throughout the table then calculated the sum. Below is my current Tabulate window and the code for this. My goal is to have a third column for each temperature with the yield which is = ((Sum at Temp)/(N at Temp)) x 100. I'm having difficulties implementing this. I figure there is either a way to do this in Tabulate or to insert a Yield column after each "N" column and calculate the yield using the previous two columns in a formula, but am having trouble thinking how to do that in a way that accounts for a variable number of columns and test temperatures. Any help would be appreciated! Thanks in advance!
list = dt << Get Column Names( string );
Remove From(list, 1, testIndex);
yieldByTest = (dt << Tabulate(
Add Table(
Column Table(
Grouping Columns(:tst_temp),
Statistics(Sum, N, Mean)
),
Row Table(
Analysis Columns(Eval(list))
)
),invisible
)
) << Make Into data Table;
yieldByTest << Set Name("Yield by Test Across Temperature");