Forum Discussion
Giavo
8 years agoHelper III
DATEDIFF between Rows and GROUP BY
Hello everybody. 2 DAX Questions about DATEDIFF. 1)I need to find the difference in minutes between the rows of "DateTime" column 2)I need to find the difference in minutes between the rows of "Dat...
- 8 years ago
here is the output i see on my end from your data
parry2k
8 years agoSuper User
try this, in query editor, add a index column , then add following measure
Minute Diff = var prevRowDate = CALCULATE(MAX(x[DateTime]), Filter(ALLSELECTED(x), x[Index] < MAX( x[Index]))) return datediff(prevRowDate, max(x[DateTime]), MINUTE)
Giavo
8 years agoHelper III
Hi parry2k, thank you again for your help. Unfortunately it didn't work today on my project at work because it says that the Start date can not be after the End date