Forum Discussion
rpinxt
2 years agoSolution Sage
Count time between rows
Probably not that difficult but still I am strugling. Here is the issue: I want to make a measure that shows me how many time each step took. So second line would be 7:34 -/- 7:32 resulting ...
Greg_Deckler
2 years agoCommunity Champion
rpinxt See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586.
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous