Forum Discussion
Duration Since Previous Entries
philipplammers 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
- philipplammers4 years agoRegular Visitor
Greg_Deckler many thanks for the very quick reply. Your post about MTBF describes pretty much what I want to achieve though I am struggling to apply it (as I said, I am newbie to this).
First issue, when I paste your code example, I get the error message "Token Eof expected" - and that is where my knowledge already ends. I don't even know what that means.
Would the next step be to replace the [Date] & [Value] with my [Date/ Time Stamp]?