Forum Discussion
Sertan_CPH
4 years agoFrequent Visitor
Change tracking between dates
Look at the below example. I have a basket of fruits and I update the fruits and the price everyday. One day I have 4 fruits and the next day I am missing the orrange. Prices are also different. ...
Greg_Deckler
4 years agoCommunity Champion
Sertan_CPH For part of the answer, you can use MTBF, which will help you show changes between days as long as items exist. 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