cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

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