Hi @txnelson ,
I have a data set with close to a hundred thousand columns, labeled as "PG1_1s_xxxxx" or "PG1_1US_xxxx". I intend to stack these columns separately into two different tables and continue with my analysis. Here's a sample of my script that I wrote to do the same.
dt = current data table();
colList = dt << Get Column Names( Numeric, "Continuous" );
For( i = 1, i <= N Items( colList ), i++,
If( Contains( colList[i], "PG1_1S_" ) &
Contains( colList[i], "MED" )
Column( colList[i] ) << Set Selected( 1 )
)
);
dt << Stack(
column(dt << get selected columns()),
Source Label Column("Label"),
Stacked Data Column("RBER"),
Name("Non-stacked Columns")(Keep(::LOT, :SLOT, :ROW, :COL, :JOB_NAME)),
Output table("PG1_1S"));
Data table("PG1_1S") << Graph Builder(
Variables( X( :V ), Y( :RBER ), Group X( :Deck ), Overlay( :JOB_NAME ) ),
Elements( Line( X, Y, Legend( 6 ) ) ),
Local Data Filter( Add Filter( columns( :Type ) ) ),
SendToReport(
Dispatch(
{},
"RBER",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12, 0 ),
Min( 0.0000000027082467925 ), Max( 1.02000000009481 ), Inc( 1 ),
Minor Ticks( 0 )}
)
)
);
<BR /><STRONG>// Creating the second stacked table.</STRONG>
colList = dt << Get Column Names( Numeric, "Continuous" );
For( i = 1, i <= N Items( colList ), i++,
If( Contains( colList[i], "PG1_1US_" ) &
Contains( colList[i], "MED" )
Column( colList[i] ) << Set Selected( 1 )
)
);
dt << Stack(
column(dt << get selected columns()),
Source Label Column("Label"),
Stacked Data Column("RBER"),
Name("Non-stacked Columns")(Keep(::LOT, :SLOT, :ROW, :COL, :JOB_NAME)),
Output table("PG1_1US"));
Data table("PG1_1US") << Graph Builder(
Variables( X( :V ), Y( :RBER ), Group X( :Deck ), Overlay( :JOB_NAME ) ),
Elements( Line( X, Y, Legend( 6 ) ) ),
Local Data Filter( Add Filter( columns( :Type ) ) ),
SendToReport(
Dispatch(
{},
"RBER",
ScaleBox,
{Scale( "Log" ), Format( "Scientific", 12, 0 ),
Min( 0.0000000027082467925 ), Max( 1.02000000009481 ), Inc( 1 ),
Minor Ticks( 0 )}
)
)
);
When I run this script, It only creates the first stacked table "PG1_1S", but not the second one. How do I modify this to create to different stacked tables.
Thanks
Apologize for the lack of clarity in my question. I'll adhere to the guidelines as you've requested from here after. Thanks for pointing it out.
Off hand, what I see, is that you are not clearing your column selections before either of your pieces of code where you select the columns you want to use in the stacking. It is probably a pretty good bet that no columns have been selected for the first stacking, but in the second stacking, all of the selected columns from the 1 stacking remain, and your second selection setting just adds to the columns that were selected from the first stacking.