@txnelson
Below is the Screen short of the results that I am expecting. I have attached the final result data table
Here are the steps:
1. Read data table and reference data table
2. Generate a new window to select site number,
3. Based on the user input (Site Number 1 or 2), align those data to the reference data table values
Take mean by wafer Id, apply the offset to the main data table
Names Default To Here( 1 );
Clear globals();
Clear log();
dt1 = Data table( "Reference data table" );
dt2 = Current data table(); /// Select Data table.jmp
For(i=1,i<=nrows(dt1),i++,
theTest = dt1:Tests[i];
try(column(dt2,theTest) << set property("TheMean", dt1:Mean[i]));
);
New window( "", modal,
ct = checkbox({"1","2"}),
Buttonbox ("Ok",
get = ct << Get Selected ();
)
);
sitenum = Transform Each({str}, get, Num(str));
Col_List1 = dt2 << Get Column Names( "String" );
//if (!contains(Col_List1, "SiteNumber"),
// dt2 <<New Column("SiteNumber", "Numeric", "Continuous", <<Set Each Value( 1 ) );
// );
For( c = 1, c <= N Col( dt2 ) -1, c++,
theMatrix = [];
name = Column( Col_List1[c] ) << Get name;
if (Contains( Col_List1[c], "Current 1.1") | Contains( Col_List1[c], "Current 2.1") | Contains( Col_List1[c], "Voltage 1.1"),
For each row(
r = dt2 << get rows where(dt2:sitenumber == sitenum[1]); /// something needs to change here ****&&&**&&&&**&&&
//mean = dt1:Mean[dt1 << Get Rows Where( :Tests == name )];
mean = column(dt2, Col_list1[c]) << get property("theMean");
//measure = mean - Col Mean( If( dt2:Strips == dt2:Strips[r], Column( dt2, c ), . ) );
measure = mean - Col Mean(as Column( dt2, c ),:Wafer ID);
theMatrix = theMatrix || Column( dt2, c )[r] + measure;
);
Column( dt2, c ) << Set Values( theMatrix );
););