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-48867%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDomanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-48867%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ETutto%2C%3C%2FP%3E%3CP%3ESto%20utilizzando%20JMP%2013.1.0%20su%20un%20computer%20Windows%207.%3C%2FP%3E%3CP%3ESto%20cercando%20di%20aggiungere%20righe%20a%20una%20tabella%20dati%20dopo%20una%20riga%20specifica.%3C%2FP%3E%3CP%3ESecondo%20la%20documentazione%20(%20%3CA%20href%3D%22http%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2F13-2%2FAdd_Rows_2.shtml)%20%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2F13-2%2FAdd_Rows_2.shtml)%3C%2FA%3E%20a%20cui%20faccio%20riferimento%2C%20il%20modo%20corretto%20per%20farlo%20%C3%A8%3A%3C%2FP%3E%3CP%3E%20%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%26lt%3B%26lt%3B%20Add%20Rows(%203%2C%2010%20)%3B%20%2F*%20add%203%20rows%20after%20the%2010th%20row%2C%20moving%20the%2011th%20and%20lower%20rows%20farther%20down%20*%2F%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EOra%2C%20approfondisco%20questo%20per%20fare%20questo%3A%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt1%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%20%2F%2F%20Open%20Sample%20Data%20%0A%0ARowStyle1%20%3D%20%7B%3Aname%20%3D%20%22Mark%22%2C%3Aage%20%3D%2012%2C%3Asex%20%3D%20%22M%22%2C%3Aheight%20%3D%2080%2C%3Aweight%20%3D%20102%7D%3B%20%2F%2F%20Define%20Row%20To%20Add%20%0A%0ARowIndex%20%3D%201%20%3B%20%2F%2F%20Define%20position%20to%20add%20desired%20row%20%0A%0Adt1%20%26lt%3B%26lt%3B%20Add%20Rows(RowStyle1%2CRowIndex)%3B%20%2F%2F%20Add%20Rows%20.%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EIl%20risultato%20di%20questo%20pezzo%20di%20codice%20%C3%A8%20mostrato%20nello%20screeshot%20seguente%3A%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F8758i07EEA692FAC806C4%2Fimage-dimensions%2F397x167%3Fv%3Dv2%22%20width%3D%22397%22%20height%3D%22167%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%20La%20riga%20non%20dovrebbe%20essere%20aggiunta%20dopo%20la%20riga%201%2C%20spostando%20essenzialmente%20le%20righe%20da%202%20a%2040%20verso%20il%20basso%3F%3CBR%20%2F%3E%20Qualcuno%20pu%C3%B2%20sottolineare%20cosa%20sto%20facendo%20di%20sbagliato%20qui%3F%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EInoltre%2C%20vorrei%20aggiungere%20un'altra%20domanda%20su%20Aggiungi%20righe()%3A%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ERowStyle2%20%3D%20%7B%3Aname%20%3D%20%22Mark%22%2C%3Aage%20%3D%2012%2C%3Asex%20%3D%20%22M%22%2C%3Aheight%20%3D%2080%2C%3Aweight%20%3D%20%3Aweight%5B1%5D%2F2%7D%3B%20%2F%2F%20Define%20Row%20To%20Add%20%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3ESe%20invece%20di%20un%20valore%20predefinito%2C%20volessi%20utilizzare%20un%20valore%20dinamico%20come%20mostrato%20sopra%20RowStyle2%20vs%20RowStyle1%2C%20dovrei%20utilizzare%20le%20espressioni%3F%20Se%20s%C3%AC%2C%20fornire%20un%20esempio.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-49470%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERi%3A%20Domanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-49470%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ecrea%20una%20nuova%20colonna%20e%20dagli%20la%20formula%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Ecol%20cumulative%20sum(%20%3ACost%20)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-49465%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERi%3A%20Domanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-49465%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECiao%20a%20tutti.%3C%2FP%3E%3CP%3Eho%20una%20tabella%20come%20questa%3A%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ECOSTO%20MESE%20Modulo%3C%2FP%3E%3CP%3ESTHI%201%2015%3C%2FP%3E%3CP%3E%3CSPAN%3ESTHI%202%2020%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESTHI%203%2025%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESTHI%205%2030%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB144%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB254%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB4%2033%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB5%2022%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%3Ecome%20puoi%20vedere%2C%20al%20colluum%20mensile%20mancano%20alcuni%20mesi%20consecutivi.%20e%20voglio%20anche%20sommare%20cumulativamente%20il%20costo%20base%20della%20colonna%20sul%20modulo%20in%20una%20nuova%20colonna%2C%20la%20nuova%20tabella%20sar%C3%A0%20cos%C3%AC%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%3ECosto%20totale%20del%20costo%20mensile%20del%20modulo%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESTHI%201%2015%2015%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESTHI%202%2020%2035%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESTHI%203%2025%2060%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESTHI%204%200%2060%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ESTHI%205%2030%2090%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB%201%2044%2044%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB2%2054%2098%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB3098%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB4%2033%20131%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOLB5%2022%20153%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%3Eesiste%20un%20modo%20per%20trasferire%20al%20tavolo%20in%20questo%20modo%2C%20potresti%20per%20favore%20aiutarmi.%20Grazie%20mille%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-48876%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERi%3A%20Domanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-48876%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4386%22%20target%3D%22_blank%22%3E%40Byron_JMP%3C%2FA%3E%20%2C%20potresti%20voler%20dare%20un'occhiata%20al%20blog%20di%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F982%22%20target%3D%22_blank%22%3E%40Craige_Hales%3C%2FA%3E%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FUncharted%2FData-table-subscripting%2Fba-p%2F21013%22%20target%3D%22_self%22%3EData%20table%20subscripting%3C%2FA%3E%20per%20esempi%20pi%C3%B9%20interessanti%20come%20questo.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-48875%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERi%3A%20Domanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-48875%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1855%22%20target%3D%22_blank%22%3E%40Justin_Chilton%3C%2FA%3E%20Bel%20consiglio!%20Lo%20terr%C3%B2%20nella%20mia%20cassetta%20degli%20attrezzi.%3C%2FP%3E%0A%3CP%3EGrazie%2C%3C%2FP%3E%0A%3CP%3E-B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-48873%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERi%3A%20Domanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-48873%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EOltre%20a%20quanto%20gi%C3%A0%20fornito%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F281%22%20target%3D%22_blank%22%3Eda%20%40vladbondarenko0%3C%2FA%3E%20%2C%20puoi%20utilizzare%20l'abbonamento%20alla%20tabella%20dati%20JMP%2013%20per%20impostare%20tutti%20i%20valori%20della%20riga%20contemporaneamente%20dopo%20aver%20gi%C3%A0%20aggiunto%20la%20riga%20dove%20desideri.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Edt%20%26lt%3B%26lt%3B%20Add%20Rows(1%2C1)%3B%0Adt%5B%5B2%5D%2C%7Bname%2Cage%2Csex%2Cheight%2Cweight%7D%5D%20%3D%20%7B%7B%22Mark%22%2C%2014%2C%20%22M%22%2C%2061%2C%20124%7D%7D%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3EOsservando%20la%20documentazione%2C%20la%20specifica%20della%20posizione%20di%20una%20riga%20nel%20messaggio%20Aggiungi%20righe%20non%20%C3%A8%20supportata%20quando%20si%20utilizza%20l'approccio%20dell'elenco%20di%20valori.%20La%20posizione%20dell'indice%20delle%20righe%20viene%20utilizzata%20solo%20quando%20si%20inseriscono%20%3CEM%3En%3C%2FEM%3E%20righe%20vuote.%20Sentiti%20libero%20di%20inviarci%20un'e-mail%20all'indirizzo%20%3CA%20href%3D%22http%3A%2F%2Fmailto%3Asupport%40jmp.com%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Esupport%40jmp.com%3C%2FA%3E%20e%20potremo%20aggiungerlo%20come%20richiesta%20di%20funzionalit%C3%A0%20da%20considerare%20in%20una%20versione%20futura%20di%20JMP.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-48871%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERi%3A%20Domanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-48871%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F6696%22%20target%3D%22_blank%22%3E%40uday_guntupalli%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EIl%20codice%20documentato%20funziona%20correttamente.%20Penso%20che%20quello%20che%20ti%20manca%20%C3%A8%20che%20la%20funzione%20Aggiungi%20righe()%20ha%202%20diverse%20strutture%20di%20codice%20e%20che%20mescolare%20le%202%20strutture%20non%20funziona.%3C%2FP%3E%0A%3CP%3EAggiungi%20righe(1)%20o%20Aggiungi%20righe(1%2C3)%20%C3%A8%20una%20delle%20strutture%20della%20sintassi%3C%2FP%3E%0A%3CP%3EE%3C%2FP%3E%0A%3CP%3EAggiungi%20righe(%7Blista%7D)%20o%20Aggiungi%20righe(%7BLista%20di%20liste%7D)%20%C3%A8%20la%20seconda%20struttura%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3EIl%20mio%20test%20del%20codice%20non%20consente%20la%20combinazione%20delle%202%20strutture%20sintattiche%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-48870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERi%3A%20Domanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-48870%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EApprezzo%20l'idea%20%40vladbindarenko0%20ma%20voglio%20capire%20perch%C3%A9%20il%20metodo%20documentato%20non%20funziona%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-48869%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERi%3A%20Domanda%20sulla%20funzione%20Aggiungi%20righe%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-48869%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ENon%20so%20se%20sia%20il%20modo%20migliore%2C%20ma%20funziona%3A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EOpen(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%20%2F%2F%20Open%20Sample%20Data%0ARowStyle1%20%3D%20%7B%3Aname%20%3D%20%22Mark%22%2C%3Aage%20%3D%2012%2C%3Asex%20%3D%20%22M%22%2C%3Aheight%20%3D%2080%2C%3Aweight%20%3D%20102%7D%3B%20%2F%2F%20Define%20Row%20To%20Add%0ARowIndex%20%3D%2010%20%3B%20%2F%2F%20Define%20position%20to%20add%20desired%20row%20%E3%80%80%0Adt1%20%26lt%3B%26lt%3B%20add%20Rows(RowStyle1%20)%3B%0Adt1%20%26lt%3B%26lt%3B%20Select%20Rows(n%20rows(dt1))%3B%0Adt1%20%26lt%3B%26lt%3B%20Move%20Rows(After(RowIndex))%3B%20%2F%2F%20Add%20Rows%20.%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%20%3C%2FP%3E%0A%3CP%3E%3CFONT%20face%3D%22Consolas%22%20size%3D%222%22%20color%3D%22%23008000%22%3E%20%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
uday_guntupalli
Level VIII

Add Rows Function Question

All, 

        I am using JMP 13.1.0 on a Windows 7 machine. 

        I am trying to add rows to a data table after a specific row. 

       According to the documentation (http://www.jmp.com/support/help/13-2/Add_Rows_2.shtml)  that I am referencing, the correct way to do that is : 

  

dt << Add Rows( 3, 10 ); /* add 3 rows after the 10th row, moving the 11th and lower rows farther down */

        Now , I expand on that to do this : 

 

dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" ); // Open Sample Data 

RowStyle1 = {:name = "Mark",:age = 12,:sex = "M",:height = 80,:weight = 102}; // Define Row To Add 

RowIndex = 1 ; // Define position to add desired row 

dt1 << Add Rows(RowStyle1,RowIndex); // Add Rows . 

The result of this piece of code is shown in the screeshot below : 

 

image.png

Shouldn't the row be added after row 1 - essentially moving rows 2 through 40 down ? 
Can someone point out what i am doing wrong here? 

 

Also - would like to add one more question on Add Rows() : 

RowStyle2 = {:name = "Mark",:age = 12,:sex = "M",:height = 80,:weight = :weight[1]/2}; // Define Row To Add 

If instead of a pre-defined value, I wanted to use a dynamic value like shown above RowStyle2 vs RowStyle1 - should I be using expressions? If yes - please provide an example. 

Best
Uday
2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Add Rows Function Question

I do not know if it is the best way, but it works:

Open( "$SAMPLE_DATA/Big Class.jmp" ); // Open Sample Data
RowStyle1 = {:name = "Mark",:age = 12,:sex = "M",:height = 80,:weight = 102}; // Define Row To Add
RowIndex = 10 ; // Define position to add desired row  
dt1 << add Rows(RowStyle1 );
dt1 << Select Rows(n rows(dt1));
dt1 << Move Rows(After(RowIndex)); // Add Rows .

 

 

View solution in original post

Re: Add Rows Function Question

In addition to what @vladbondarenko0 already provided, you can use JMP 13 data table subscripting to set all the row values at once after you already added the row where you want.

dt << Add Rows(1,1);
dt[[2],{name,age,sex,height,weight}] = {{"Mark", 14, "M", 61, 124}};

Looking at the documentation, specifying a row position in the Add Rows message is not supported when using the list of values approach. The row index position is only used when inserting n empty rows. Feel free to shoot us an email at support@jmp.com and we can add this as a feature request for consideration in a future release of JMP.

Justin

View solution in original post

8 REPLIES 8

Re: Add Rows Function Question

I do not know if it is the best way, but it works:

Open( "$SAMPLE_DATA/Big Class.jmp" ); // Open Sample Data
RowStyle1 = {:name = "Mark",:age = 12,:sex = "M",:height = 80,:weight = 102}; // Define Row To Add
RowIndex = 10 ; // Define position to add desired row  
dt1 << add Rows(RowStyle1 );
dt1 << Select Rows(n rows(dt1));
dt1 << Move Rows(After(RowIndex)); // Add Rows .

 

 

uday_guntupalli
Level VIII

Re: Add Rows Function Question

Appreciate the idea @vladbindarenko0 but I want to understand why the documented method is not working
Best
Uday
txnelson
Super User

Re: Add Rows Function Question

@uday_guntupalli

The documented code works correctly.  I think what you are missing, is that the Add Rows() function has 2 different code structures, and that mixing the 2 structures does not work.

Add Rows(1) or Add Rows(1,3) is one of the syntax structures

and

Add Rows({list}) or Add Rows({List of Lists}) is the second structure

 

My testing of the code does not permit the mixing of the 2 syntax structures

Jim

Re: Add Rows Function Question

In addition to what @vladbondarenko0 already provided, you can use JMP 13 data table subscripting to set all the row values at once after you already added the row where you want.

dt << Add Rows(1,1);
dt[[2],{name,age,sex,height,weight}] = {{"Mark", 14, "M", 61, 124}};

Looking at the documentation, specifying a row position in the Add Rows message is not supported when using the list of values approach. The row index position is only used when inserting n empty rows. Feel free to shoot us an email at support@jmp.com and we can add this as a feature request for consideration in a future release of JMP.

Justin
Byron_JMP
Staff

Re: Add Rows Function Question

@Justin_Chilton  Nice Tip!  I'm going to keep that one in my tool box.

Thanks,

-B

JMP Systems Engineer, Health and Life Sciences (Pharma)

Re: Add Rows Function Question

@Byron_JMP, you might want to check out @Craige_Hales' blog Data table subscripting for more cool examples like that.

Justin
HauNguyen
Level I

Re: Add Rows Function Question

Hi All.

i have a table like this:

 

Module    MONTH     COST

STHI           1             15

STHI           2             20

STHI           3             25

STHI           5             30

OLB           1              44

OLB           2             54

OLB           4              33

OLB          5               22

 

as you can see, month colluum is missing some months in a row. and i also want to cumulative sum the cost coluum base on module into a new coluum, the new table will be like this:

 

Module    Month    cost      totalcost

STHI         1           15           15

STHI         2           20           35

STHI         3           25           60

STHI         4           0             60

STHI        5            30           90

OLB         1            44          44

OLB         2            54          98

OLB         3             0           98

OLB         4             33        131

OLB         5            22         153

 

is there any way to transfer to the table like this, could you please to help me. Thank you so much

txnelson
Super User

Re: Add Rows Function Question

create a new column and give it the formula

col cumulative sum( :Cost )
Jim

Recommended Articles