Forum Discussion
RichardT_78
5 years agoHelper I
Time
Hi I have used this code to determine the time difference between rows as a messure. This looks at each row of data. Time Difference Measure13 = VAR NextRow = CALCULATE ( MIN ( FAC[S...
- Anonymous5 years ago
Hello @RichardT_78 ,
You can update your measurement as below screenshot shown, please find more details in the attachment:
Time Difference = VAR _nexindex = CALCULATE ( MIN ( 'FAC'[Index] ), FILTER ( ALLEXCEPT ( 'FAC', 'FAC'[Consist] ), 'FAC'[Index] > MAX ( 'FAC'[Index] ) ) ) VAR _nexttime = CALCULATE ( MAX ( 'FAC'[Start Date/Time] ), FILTER ( ALLEXCEPT ( 'FAC', 'FAC'[Consist] ), 'FAC'[Index] = _nexindex ) ) RETURN DATEDIFF ( SELECTEDVALUE ( 'FAC'[Start Date/Time] ), _nexttime, SECOND ) + 0Best regards
RichardT_78
5 years agoHelper I
Thank you