The TIBCO Platform is a real-time, composable data platform that will bring together an evolving set of your TIBCO solutions - and it's available now!
A chart showing the TIBCO Platform vision
Jump to content
Forums
Ask questions and gain insight from discussions

Recommended Posts

Posted

Hello,

Need help!

I need to find the time difference between the datetime that are in 2 separate rows. And how will I apply that logic to the rest of the data in file

Sample data:

Column1. Column2.

Row 1. 2019-08-01 12:30:15. Hold

Row 2. 2019-08-01 12:35.20. Release

Row 3. 2019-08-01 3:40:05. Hold

Row 4. 2019-02-01 3:42:09. Release

How would I find the difference between the Hold and the Release date/time

 

Thanks!

Posted

I perhaps have a solution. It will only work if your data are exactly alternating between holds and releases (so no overlapping periods).

Create a column with the id of the row (so insert calculated column whose expression is `RowId()`). Let's call this column "RowId".

Then, you can create yet another column call "Differences" with the formula

DateDiff([Column1.],Last([Column1.]) over (Previous([RowId])))

Hope that helps.

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...