In my script, I have a list variable (MyList1) containing the column names, and I would like to stack those columns using "Multiple Series Stack" to create a new table. Also, for "Number of Series" I would like to include NItems(MyList2). Can someone help me with the syntax?
I think this should work:
StackDT = SplitDT << Stack( Columns( MyList1 ), Source Label Column( "Source" ), Stacked Data Column( "Data" ), Number of Series( NItems( MyList2 ) ) ) );
but it gives me "Column not found in access or evaluation of 'Bad Argument' " in the log.
Yes. Look up Multiple Series Stack in the docs. There seems to be a minor bug which results in stacked date columns in multiple series stacking not being formatted as dates so you'll have to apply that format after stacking. Single column stacking of dates does maintain date format. You will also have to clean up some extra columns that result from the stacking.