Hi Community, My intention is to create multiple table via tabulate, sort the target column in each table from largest to smallest, put them together via new window, and show the first row data in green. Below is how i did it with sample data big class, with some issues I cannot figure out why:
1. the sorting window keeps open and does not really perform the sorting
2. the tabulate platform keeps open
3. don't know how to color cells after I put them in data table box in a new window
Below is my JSL:
Open( "$SAMPLE_DATA/Big Class.jmp" );
Data Table( "Big Class.jmp" ) << Tabulate();
Local( {obj},
obj = Data Table( "Big Class.jmp" ) << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Analysis Columns( :height ) ),
Row Table( Grouping Columns( :name ) )
)
);
dt1 = obj << Make Into Data Table;
obj << Close Window;
);
dt1 << Sort(
By( :"sum(height)"n ),
Replace Table,
Order( Descending )
);
Data Table( "Big Class.jmp" ) << Tabulate();
Local( {obj},
obj = Data Table( "Big Class.jmp" ) << Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table( Analysis Columns( :weight ) ),
Row Table( Grouping Columns( :name ) )
)
);
dt2 = obj << Make Into Data Table;
obj << Close Window;
);
dt2 << Sort(
By( :"sum(weight)"n ),
Replace Table,
Order( Descending )
);
nw = new window("summary", H list box(data table box(dt1), data table box(dt2)));