Suppose I wanted to name the subset table after the value for which it is filtering. I've defined a new line of code in the 'for loop' that should get the r(th) row from the summary table, but it isn't working for some reason.
(I haven't figured out how to post code correctly, so I'll paste it in two parts, starting with defining the data tables, then the for loop:
dt = Current Data Table(); If( N Items( dt << Get Selected Columns() ) != 1, Throw( "select a column first" ) ); dtsum = dt << Summary( Group( dt << Get Selected Columns() ) ); dt << Clear Column Selection();
I kept adding a "!" to the --> at the end, so problem solved! :)
Here is my comprehensive code. I'm trying to name each subset data table after the value of the Rth row from the summary data table (dtsum). I tried using a variation of the code you recommended here yesterday, as well as today, and I just can't figure out how to establish the variable that grabs the value I'm subsetting the table for.
Another option is to use the Summarize command to create a list of unique values in the selected column. The For loop would loop through each item in the list and make a subset data table for each. Notice the Output Table Name argument demonstrates how to give the subset tables appropriate names.