I guess I'm not understanding why if you select the keep the columns options it will fill the kept columns with permuted data that does not correspond correctly to the split data form the original rows of the original table. In what possible situation would this default behavior be useful?
For example why wouldnt it go through the original table row by row and after the split generate new table with a corresponding row for each original one but just with the selected column split out.
The way it behaves for me is that while it's doing the splitting it ends up with permuted data in the kept columns.
The only way to keep the data correctly associated row by row is to include all of the kept columns in the grouping.
I'd love to upload a datatable here as an example but obviously my company does not allow us to share any of the private data.
*edit: I recoded the table so I'm going to upload it here.
This table has columns A through G.
I want to split Col G by Col B while keeping all of the lables in col A,C,D,E correctly associated with the corresponding data in the split col G.
Running the following script generates a messed up table with the entries in col A,C,D,E not corresponding to their relative values from the split col G.
Data Table( "example-table" ) << Split( Split By( :B ), Split( :G ) )
This generates a correct result I think:
Data Table( "example-table" ) << Split(
Split By( :B ),
Split( :G ),
Group( :A, :C, :D, :E ),
Sort by Column Property
)
But I'm still not understanding why anything needs to be grouped in the 1st place:
If I run the following script it's showing me that the original table only has one row for a given combination of A, B, C, D, E, so no grouping should be required right?
Data Table( "example-table" ) << Summary(
Group( :A, :C, :D, :E, :B ),
Freq( "None" ),
Weight( "None" )
)