Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello all,
I have a question re: how to calculcate a moving 3 month, 6 month and 12 month average for some headcount data. My main data table looks like this:
So I have the count by date, department, work category and location. My goal is to be able to set up a table where I can see the 3-month, 6-month, and 12-month averages for each location, department, work category and then sum up this average if I need to. For example, I'd like to be able to see the overall 3-month average for all of Operations in Shanghai for August 2020. Is this possible? I've been reading about setting up a date table but I'm not sure if that's required for this. Thank you in advance.
@socalkid , Try like
3 Month Avg = CALCULATE(AverageX(Values('department'[department]),calculate(Sum('Table'[Value)))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))
6 Month Avg = CALCULATE(AverageX(Values('department'[department]),calculate(Sum('Table'[Value)))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))
6 Month Avg = CALCULATE(AverageX(Values('Date'[MONTH Year]),calculate(Sum('Table'[Value)))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))
3 Month Avg = CALCULATE(AverageX(Values('Date'[MONTH Year]),calculate(Sum('Table'[Value)))
,DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-3,MONTH))
Rolling Months Formula: https://youtu.be/GS5O4G81fww
Average of Rolling, Average of Snapshots: https://youtu.be/_pZRdLAJxxA
Power BI Window function Rolling, Cumulative/Running Total, WTD, MTD, QTD, YTD, FYTD: https://youtu.be/nxc_IWl-tTc
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
106 | |
86 | |
77 | |
69 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |