cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-17465%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EDenominazione%20dei%20sottoinsiemi%20in%20JSL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-17465%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CP%3ECIAO!%3C%2FP%3E%3CP%3EHo%20un%20grande%20dt%20e%20voglio%20creare%20sottoinsiemi%20da%20una%20colonna.%20Sono%20riuscito%20a%20farlo%2C%20ma%20i%20sottoinsiemi%20hanno%20tutte%20le%20colonne%20bloccate.%20Come%20posso%20sbloccarli%20nel%20codice%3F%3C%2FP%3E%3CP%3EInoltre%2C%20come%20posso%20specificare%20i%20suoi%20nomi%2C%20in%20modo%20da%20poter%20lavorare%20con%20quelli%20in%20seguito%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CTABLE%20height%3D%22217%22%20style%3D%22height%3A%20219px%3B%20width%3A%20489px%3B%22%3E%3CTBODY%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3Edt2%20%26lt%3B%26lt%3B%20(Sottoinsieme(%3C%2FP%3E%3CP%3EPer(%3AFiliale)%2C%3C%2FP%3E%3CP%3ERighe%20selezionate(%200%20)%2C%3C%2FP%3E%3CP%3Ecolonne(%3CSPAN%20style%3D%22font-size%3A%2010pt%3B%20line-height%3A%201.5em%3B%22%3E%20%3AMerluzzo.%20Cliente%20DPK%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3ADesc.%20Municipio%20Cadastro%2C%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3E%3C%2FSPAN%3E%3ADesc.%20Cliente%2C%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3E%3C%2FSPAN%3E%3ADesc.%20Tipo%20Cliente%20N1%2C%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3E%3C%2FSPAN%3E%3ADesc.%20Tipo%20Cliente%20N2%2C%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3E%3C%2FSPAN%3E%3ANome(%20%22Somma(Vlr.%20Vendita%20commerciale)%22%20)%2C%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3E%3C%2FSPAN%3E%3ANome(%20%22Somma(Vlr.%20Lucro%20Bruto)%22%20)%2C%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2013.3333px%3B%22%3E%3C%2FSPAN%3E%3AMg%20Bruta%3C%2FP%3E%3CP%3E)))%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-17467%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Denominazione%20di%20sottoinsiemi%20in%20JSL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-17467%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EOh%2C%20%C3%A8%20fantastico!%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EVoglio%20solo%20rompere%20il%20dt%20originale%20negli%20altri%20e%20lavorare%20con%20ciascuno%20in%20modi%20diversi...%20E'%20questo%20il%20modo%20migliore%20per%20effettuare%20la%20separazione%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EUn'altra%20domanda%3A%20quando%20lavoro%20con%20ciascuna%20delle%20tabelle%20sottoinsiemi%2C%20come%20le%20specifico%3F%20Con%20dts1%2C%20dts2%2C%20ecc.%3F%20Oppure%20posso%20anche%20determinare%20quello%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-17466%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Denominazione%20di%20sottoinsiemi%20in%20JSL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-17466%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EA%20seconda%20di%20cosa%20vuoi%20che%20accada%20dopo%2C%20potrebbe%20esserci%20un%20modo%20migliore%20per%20fare%20ci%C3%B2%20che%20hai%20in%20mente%20(magari%20utilizzando%20un'istanza%20di%20filtro%20dati).%20Ma%2C%20se%20vuoi%20o%20hai%20bisogno%20di%20usare%20'subset'%2C%20prova%20qualcosa%20come%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin%3A%200px%3B%20line-height%3A%20normal%3B%20font-family%3A%20Menlo%3B%20color%3A%20%23032ce4%3B%22%3ENomi%20predefiniti%20qui%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20(%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%201%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%20style%3D%22margin%3A%200px%3B%20line-height%3A%20normal%3B%20font-family%3A%20Menlo%3B%20color%3A%20%23942193%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Edt%20%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23032ce4%3B%22%3E%20Aprire%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20(%3C%2FSPAN%3E%20%22%24SAMPLE_DATA%2FClasse%20grande.jmp%22%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin%3A%200px%3B%20line-height%3A%20normal%3B%20font-family%3A%20Menlo%3B%20color%3A%20%23008f00%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3Edt%20%3D%20dt%20%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%20sottoinsieme%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%20(Per(%3Asesso)%2C%20Colonne(%3Anome%2C%20%3Aet%C3%A0))%3B%3CSPAN%20class%3D%22Apple-tab-span%22%20style%3D%22white-space%3A%20pre%3B%22%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%20%2F%2F%20Utilizzando%20'By'%20si%20crea%20una%20tabella%20di%20sottoinsieme%20per%20ciascun%20livello%20nella%20colonna%20specificata.%20'dts'%20%C3%A8%20un%20elenco%20di%20riferimenti%20a%20tabelle%20associate%3C%2FP%3E%3CP%20style%3D%22margin%3A%200px%3B%20line-height%3A%20normal%3B%20font-family%3A%20Menlo%3B%20color%3A%20%23008f00%3B%22%3E%2F%2F%20Cambia%20i%20nomi%20delle%20tabelle%20del%20sottoinsieme%3C%2FP%3E%3CP%20style%3D%22margin%3A%200px%3B%20line-height%3A%20normal%3B%20font-family%3A%20Menlo%3B%22%3Edts%5B%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%201%3C%2FSPAN%3E%20%5D%26lt%3B%26lt%3B%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%20imposta%20nome%3C%2FSPAN%3E%20(%3CSPAN%20style%3D%22color%3A%20%23942193%3B%22%3E%20%22Femmine%22%3C%2FSPAN%3E%20)%3B%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%3B%20font-size%3A%2010pt%3B%22%3Edts%5B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23009193%3B%22%3E%202%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%3B%20font-size%3A%2010pt%3B%22%3E%20%5D%26lt%3B%26lt%3B%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23011993%3B%22%3E%20imposta%20nome%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%3B%20font-size%3A%2010pt%3B%22%3E%20(%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23942193%3B%22%3E%20%22Maschi%22%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20Menlo%3B%20font-size%3A%2010pt%3B%22%3E%20)%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
theo_beluzzi
Level I

Naming subsets in JSL

Hi!

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. Cliente,

                                         :Desc. Tipo Cliente N1,

                                         :Desc. Tipo Cliente N2,

                                         :Name( "Sum(Vlr. Venda Comercial)" ),

                                         :Name( "Sum(Vlr. Lucro Bruto)" ),

                                         :Mg Bruta

  )));

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: Naming subsets in JSL

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[1] << setName("Females");

dts[2] << setName("Males");

View solution in original post

2 REPLIES 2
ian_jmp
Level X

Re: Naming subsets in JSL

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[1] << setName("Females");

dts[2] << setName("Males");

theo_beluzzi
Level I

Re: Naming subsets in JSL

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?

Recommended Articles