I have a large dt, and want do make subsets from a column. I've managed to do it, but the subsets have all the columns locked. How I can unlock them in the code?
Also, how can I specify it's names, so I can work with those later?
dt2 << (Subset(
By( :Filial ),
Selected Rows( 0 ),
columns( :Cod. Cliente DPK,
:Desc. Município Cadastro,
:Desc. Tipo Cliente N1,
:Desc. Tipo Cliente N2,
:Name( "Sum(Vlr. Venda Comercial)" ),
:Name( "Sum(Vlr. Lucro Bruto)" ),
Go to Solution
Depending on what you want to happen next, there may be a better way to do what you have in mind (maybe using a data filter instance). But, if you want or need to use 'subset', try something like:
Names Default To Here( 1 );
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dts = dt << subset(By(:sex), Columns(:name, :age)); // Using 'By' makes a subset table for each level in the hspecified column. 'dts' is a list of associated table references
// Change the names of the subset tables
dts << setName("Females");
dts << setName("Males");
View solution in original post
Ooh, that's great!
I just want to break the original dt in others, and work with each in different ways... That's the best way of doing the separation?
Another question: when working with each of the subsetted tables, how i specify them? By dts1, dts2, etc.? Or I can also determine that?
There are no labels assigned to this post.