Forum Discussion
farhanerd
5 years agoFrequent Visitor
Calculate Daily Differences Based on Dates and Changing Province
Hello, I need to make a line graph actually like this picture below, but with a different table It is quite actually simple on making that graph since id_provinsi is not changing and I am stil...
Greg_Deckler
Community Champion
5 years agofarhanerd 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
farhanerd
5 years agoFrequent Visitor
This is my expected result