Forum Discussion
carnage66
4 years agoFrequent Visitor
Showing deviation compared to average or previous value
Hi guys, Looking to create a report showing deviations. - deviation against the previous day - deviation for each day against the average for the selected period Is there any way to do that? I s...
amitchandak
4 years agoSuper User
carnage66 , with help from date table
This Day = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
Last Day = CALCULATE(sum('Table'[Qty]), previousday('Date'[Date]))
diff =[This Day] - [Last Day]
Avg of duration = calculate(Averagex(Values('Date'[Date]), [This Day]) , allselected())
diff= [This Day] - [Avg of duration]
carnage66
4 years agoFrequent Visitor
Hey amitchandak , thanks for the swift response. The functions for This/Last day work great, however the Avg of duration calculates the average for the entire matrix as shown below where as I want it to show the average for the row.