cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
natalie_
Level V

Can you "do math" in a data table?

So far, I haven't found anything in the tutorials that tells me I can, but I thought I'd ask anyway.

If I have imported a csv file into a data table, can I add the values of cells together, or set a cell equal to another cell like I can with excel?

2 ACCEPTED SOLUTIONS

Accepted Solutions
DaveLee
Level IV

Re: Can you "do math" in a data table?

natalie_,

The answer is yes.  JMP has many functions that you can invoke for summing rows, columns, etc.  It is is little different if you want to, for example, add cells that are in different rows but it still can be done.  In the simple example below, I created Column 1 as a list 1 through 9. 

10727_pastedImage_3.png

Then I used one of the many built-in functions available in the Formula Editor to square Column 1.

10726_pastedImage_2.png

You can add, subtract disparate cells in JMP but it's a little different than Excel.  I add the first rows of Column 1 and Column 2 in the Sum Column by typing directing in the JMP file: =:Column1 + :Column 2 (i.e, 1+1=2).  To demonstrate addition of non contiguous cells I typed in Row 3 of the Sum column the following formula: =Column 1[2] + :Column 2[4].  This last example adds the element in the second row in the Column 1 to the fourth element of Column 2. 

Hope this helps.  There are many ways to 'do math' in JMP. 


Dave

View solution in original post

Jeff_Perkinson
Community Manager Community Manager

Re: Can you "do math" in a data table?

JMP data tables are more structured than a spreadsheet. Each row is assumed to be independent of every other row. So, formulas (math) are applied to an entire column, not an individual cell.

You create a formula column using the Formula Editor​.


-Jeff

View solution in original post

6 REPLIES 6
DaveLee
Level IV

Re: Can you "do math" in a data table?

natalie_,

The answer is yes.  JMP has many functions that you can invoke for summing rows, columns, etc.  It is is little different if you want to, for example, add cells that are in different rows but it still can be done.  In the simple example below, I created Column 1 as a list 1 through 9. 

10727_pastedImage_3.png

Then I used one of the many built-in functions available in the Formula Editor to square Column 1.

10726_pastedImage_2.png

You can add, subtract disparate cells in JMP but it's a little different than Excel.  I add the first rows of Column 1 and Column 2 in the Sum Column by typing directing in the JMP file: =:Column1 + :Column 2 (i.e, 1+1=2).  To demonstrate addition of non contiguous cells I typed in Row 3 of the Sum column the following formula: =Column 1[2] + :Column 2[4].  This last example adds the element in the second row in the Column 1 to the fourth element of Column 2. 

Hope this helps.  There are many ways to 'do math' in JMP. 


Dave

natalie_
Level V

Re: Can you "do math" in a data table?

Thank you very much!  I had figured out how to multiply an entire column, but I couldn't figure out how to add non contiguous cells.  Great examples too, btw!

DaveLee
Level IV

Re: Can you "do math" in a data table?

You're welcome.  There are seemingly endless ways to do things in JMP.  jeff.perkinson​'s post is a great place to get more familiar with the Formula Editor.  Another option is to do manipulations in JSL the script language. 

ENTHU
Level IV

Re: Can you "do math" in a data table?

Can you pls share how you were able to multiply different rows of a column?

Craige_Hales
Super User

Re: Can you "do math" in a data table?

here's a starting point: Formula Editor

Craige
Jeff_Perkinson
Community Manager Community Manager

Re: Can you "do math" in a data table?

JMP data tables are more structured than a spreadsheet. Each row is assumed to be independent of every other row. So, formulas (math) are applied to an entire column, not an individual cell.

You create a formula column using the Formula Editor​.


-Jeff