cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

Creating a formula that gives difference between rows

Hello everyone, 

 

I would like to know how to create a formula that checks the differences between the rows.

 

For example, I have here a file (Data 1) with a column of trials from 1 to 8 (several sequences).

Another column contains the time parameter.

How do I create a new column that checks the time differences between trials 2 and 1, 3 and 2, etc.

 

Thanks. 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Creating a formula that gives difference between rows

Based on the provided data, Lag() or Dif() should work

If(:Trial == 1,
	.,
	Dif(:"Time to finish (sec)"n)
)

jthi_0-1688983729481.png

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Creating a formula that gives difference between rows

Based on the provided data, Lag() or Dif() should work

If(:Trial == 1,
	.,
	Dif(:"Time to finish (sec)"n)
)

jthi_0-1688983729481.png

 

-Jarmo

Re: Creating a formula that gives difference between rows

Yes, it works.

 

Thank you.

Recommended Articles