I'm having an issue where I want to tabulate the sum and n for each test in a large testprogram. I'm not sure what my issue is, but would appreciate some guidance. The code compiles and outputs the Tabulate window as seen below, but isn't populated.
![MichaelO_0-1658436074336.png MichaelO_0-1658436074336.png](https://community.jmp.com/t5/image/serverpage/image-id/44216i43000C179EBDF310/image-size/medium?v=v2&px=400)
Below is the code I have written:
dt = Current Data Table();
colList = dt << Get Column Names( string );
colname = Column(dt, "TEST_T") << getname;
testIndex = (Loc(colList, colname))[1];
numRows = N Rows(dt);
For(i = (testIndex + 1), i <= N Items(colList), i++,
column = Column(dt, colList[i]);
For(j = 1, j <= numRows, j++,
column[j] = Substitute(column[j],
"Pass", "1",
"Fail", "0"
);
);
);
//Change Modeling Type for Tabulate functionality
dt:tst_temp << Set Modeling Type(Nominal);
dt:SITE_NUM << Set Modeling Type(Nominal);
////Change Every Column after TEST_T to Numeric Data Type and Continuous Modeling type
For(i = (testIndex + 1), i <= N Items(colList), i++,
column = Column(dt, colList[i]);
column << Data Type(Numeric);
column << Set Modeling Type(Continuous);
);
list = dt << Get Column Names( string );
Remove From(list, 1, testIndex);
yieldByTest = (dt << Tabulate(
Add Table(
Column Table(
Grouping Columns(:tst_temp),
Statisitcs(Sum, N)
),
Row Table(
Analysis Columns(Column(Eval(list)))
)
),invisible
)
) << Make Into data Table;
yieldByTest << Set Name("Yield by Test Across Temperature");