Forum Discussion
pak
8 years agoHelper II
Time difference between next row
Hi all, I have another question, A want to to count time difference between actual row and next row, when "bit" equals 1, like beneath: Date/Time Bit Time Difference 2018-01-11T17:03...
- 8 years ago
May be a MEASURE instead of a column would handle memory better.
Try this MEASURE
Time Difference Measure = VAR NextRow = CALCULATE ( MIN ( TableName[Date/Time] ), FILTER ( ALL ( TableName ), TableName[Date/Time] > SELECTEDVALUE ( TableName[Date/Time] ) ) ) RETURN IF ( SELECTEDVALUE ( TableName[Bit] ) = 1, DATEDIFF ( SELECTEDVALUE ( TableName[Date/Time] ), NextRow, SECOND ) )
Zubair_Muhammad
8 years agoCommunity Champion
Zubair_Muhammad
8 years agoCommunity Champion
You can add MEASURE from the MODELLING tab or by right clicking the Table
Then use a Table Visual as shown in the Picture below