Forum Discussion
Giavo
Helper III
8 years agoDATEDIFF 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
Super User
8 years agotry 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)
benario
8 years agoNew Member
hey, I have understood that the x in x[index] is the table name. However every time i run that same formula ti get the message that the the syntax for '[index]' is incorrect. how do i correct it?