Forum Discussion
How to get the time difference between any 2 rows (consecutive or nonconsecutive)?
Hi,
I have the following data set:
The data is sorted and grouped by _objectid_value.
I want to be able to get the datetime diff between any 2 rows consecutavily or not. For example I want to get the datetime diff between each Active and Close events (as per the data in the screenshot, these values could be consecutive or nonconsecutive), how to achieve this?
3 Replies
- arvindsingh802
Community Champion
Pivot your data in power query and then take the difference between columns (Active & Close).
If this post helps, then please consider Accept it as the solution and give it a thumbs up
- awtahhanRegular Visitor
I ahve other calculations based on the current structure, is there anyway to accomplish my goal withou pivotting the table? maybe using DAX?
- AnonymousNot applicable
Hi awtahhan ,
Can you provide an expected result for reference?
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.