Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
carnage66
Frequent 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 should note that I'm using SSAS so I'm unable to create columns to the source tables, only measures.

carnage66_0-1646646305397.png

 

2 REPLIES 2
amitchandak
Super User
Super 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]

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. 

 

carnage66_0-1646649095166.png

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.