Forum Discussion
Peter_2020
5 years agoHelper III
Time difference between specific rows
Hello all, I would like to ask for help with calculation of time difference between specific rows in one table. I have this kind of data: DATE/TIME RC KEY 7-10-20 6:00 AM 1101 01 7...
- 5 years ago
Finally I found solution. For those whom it can help:
Time Difference Measure =VAR NextRow =CALCULATE (MIN ( Table[DATE/TIME]), FILTER ( ALLEXCEPT ( Table , Table[RC] ), Table[DATE/TIME] > SELECTEDVALUE ( Table[DATE/TIME])))RETURNIF (SELECTEDVALUE ( Table[Bit] ) = 1,DATEDIFF ( SELECTEDVALUE ( Table[DATE/TIME] ), NextRow, SECOND ))BIT is measure which returns 1 for KEY - 04,05,06.
Peter_2020
5 years agoHelper III
Finally I found solution. For those whom it can help:
Time Difference Measure =
VAR NextRow =
CALCULATE (
MIN ( Table[DATE/TIME]), FILTER ( ALLEXCEPT ( Table , Table[RC] ), Table[DATE/TIME] > SELECTEDVALUE ( Table[DATE/TIME])))
RETURN
IF (
SELECTEDVALUE ( Table[Bit] ) = 1,
DATEDIFF ( SELECTEDVALUE ( Table[DATE/TIME] ), NextRow, SECOND ))
BIT is measure which returns 1 for KEY - 04,05,06.