cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
AFaiz
Level III

subtract cells from different rows

is there a way to do this calculation in JMP?

i would like to subtract cell 1 from cell 2 and place the result in a new column, cell3 from cell4, and so on.

AFaiz_0-1713470057756.pngAFaiz_0-1713470057756.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: subtract cells from different rows

You can use Lag() to access values from other rows of a column. Then you can create a formula using Lag between those two columns you have

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

dt << New Column("S", Numeric, Continuous, Formula(
	Lag(:weight) - :height 
));

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: subtract cells from different rows

You can use Lag() to access values from other rows of a column. Then you can create a formula using Lag between those two columns you have

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

dt << New Column("S", Numeric, Continuous, Formula(
	Lag(:weight) - :height 
));

 

-Jarmo
AFaiz
Level III

Re: subtract cells from different rows

it works great. Thank you so much

Recommended Articles