Forum Discussion
markefrody
4 years agoPost Patron
Define Dynamic Time Values Into Shifts
Hi all, I'm not sure how I can do this in Power BI. Appreciate your kind advice. I have two tables containing the following: Table 1: Manager Schedule Contains the shift schedule and meal (br...
Greg_Deckler
4 years agoCommunity Champion
markefrody While for a different purpose, you essentially need MTBF: 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
- KNP4 years agoSuper User
Greg_Deckler - that's a nice pattern. They should turn that into a quick measure. 😉