Jump to content

Subtracting Time from Next Row


Ashley Neese

Recommended Posts

So I am sure it has already been answered, but I need to Subtract aparticular column from thenext row from a different column from the current row.I feel like I have tried everything I can think of.

DateDiff([Plugged Date and Time],[Plug Date and Time] over NextPeriod([Line No.])

In the image attached, I am trying to subtract the RED value from the PURPLE value all the way down. Any help would be greatly appreciated.

Link to comment
Share on other sites

Please also check out 'Previous' and 'LastPeriod' function in the help menu.

Since your Line No is unique it doesn't really matter what you use for aggregation (first, min, max...). And I think the aggregation is what you missed.

In the following example I used:

DateDiff("hour",[Plug],First([Plugged]) OVER (Previous([Line No])))

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...