cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
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.