https://www.jmp.com/support/help/14-2/use-set-selected-to-select-columns.shtml
What's the best way to rewrite something like this?
The intent is that DT is a join of TRANSPOSE and CATEGORY_TABLE.
- CATEGORY_TABLE is a one column table with column Category
- TRANSPOSE is the result of a data transpose
The trick is that TRANSPOSE doesn't always have the same number of columns. Confusingly, the output of the transpose function names the additional columns Row 1, Row 2, etc.
- TRANSPOSE's first two columns are always the same.
- Column Row 1 will always exist as the 3rd column.
- Column(s) Row 2 and beyond may exist depending on the dataset.
Can I write the Select() function in such a way that the Join() will select at least column Row 1 and then if there are more thru the last column?
// This section is only build to handle two columns named Row 1 and Row 2
DT = Data Table( TRANSPOSE ) << Join(
With( Data Table( CATEGORY_TABLE ) ),
Select( :Forecast Material ),
SelectWith( :Category ),
Select( :Row 1, :Row 2 ), // sometimes there is only one row, sometimes there are more than one rows ******How to handle this?********
By Matching Columns( :Label = :Category ),
Drop multiples( 0, 0 ),
Include Nonmatches( 0, 0 ),
Preserve main table order( 1 )
);