Forum Discussion
Time difference between next row
- 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 ) )
Sadly i don't have any result with this method (all rows are null). I tried to mix it up but with no result.
- pak8 years agoHelper II
Thanks Zubair_Muhammad - for your time and patience :)
Rookie mistake! :)
It would be very helpfull for me in the future!
- pak8 years agoHelper II
So this is strange, cause in my case it doesn't:
The only difference: i have ";" and you have ",". With "," i get Syntax error.
- Zubair_Muhammad8 years agoCommunity Champion
- Zubair_Muhammad8 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
- Zubair_Muhammad8 years agoCommunity Champion
- pak8 years agoHelper II
With even 1000 of rows it is ok, but when i tried to do this with all data (for now it's over 30000 rows) it was using 100% of my memory for 10minutes with no result. I had to kill the process because i was unable to do anything on my PC.
Maybe it is because we take MIN from all rows from table with every row calculation?
Maybe i'll add INDEX column and next row will be INDEX+1 row, so there is no need to calucate all?
Also with Time Diference Measure i was unable to SUM all time difference, and i have to do so.