Hello,
I would like to calculate row data by referencing columns/data found in another table. I am trying to calculate Yield in Table #2 by pulling data from Table #1 without joining the tables. Is there a way to do this? Here is what I have so far...
Table #1 = WaferRgDt
Table #2 = dt1 : I am trying to populate this with data that is calculated from Table #1

For( j = 1, j <= N Rows( dtWaferIDList ), j++,
Eval(
Parse(
tempj = Column( dtWaferIDList, 1 )[j];
dt1 << select where( :Wafer == tempj);
dt1 << Add Rows({Wafer = tempj
, NTested = If( Selected( Row State( Row() ) ), Col Number( :Name("FailDie")))
, GoodDie = If( Selected( Row State( Row() ) ), Col Number( If(:Name("FailDie") == 0, 1, . )))
, Yield = If( Selected( Row State( Row() ) ), 100 * :Name("GoodDie") / :Name("NTested"))})
)
)
);The main logical issue with this code I am having is that the column "FailDie" is not a part of table dt1, but instead a part of Table #2 and I don't think it is able to read that data in its current state.
Here is an example of one way to handle what you are looking to do:

Names Default To Here( 1 );
dt = Open( "$sample_data/big class.jmp" );
dt1 = new table("Final",
new Column("Gender", character),
new column("Mean"),
new column("Count")
);
Summarize( dt, dtWaferIDList = By( :sex ) );<BR />
// Loop across groups found in Summarize
// Changed to using k as an index. There is a j() function in JMP
// and using k will avoid any confusion
For( k = 1, k <= N Items( dtWaferIDList ), k++,
dt1 << add rows( 1 );
dt1:Gender[k] = dtWaferIDList[k];
// Find rows in dt data table that match the current Gender
theRows = dt << get rows where( dt:sex == dtWaferIDList[k] );
// Calculate Mean
dt1:Mean[k] = Mean( dt:Height[theRows] );
// Calculate the Count
dt1:Count[k] = N Rows( theRows );
);