The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Experts,
My formula for Headcount is working fine for each month as shown below
It's just that I don't understand how to calculate 12 Month Rolling Average of this Headcount shown
I know many have asked this question before, but all the approaches are doing average of a column from a table
My question is different because I have to do average of a measure over 12 months rolling for a given month
Please advise!
Solved! Go to Solution.
I used this article from SQLBI https://www.daxpatterns.com/month-related-calculations/ to solve this issue
Attaching solution just in case it helps anyone
Sincere Kudos to @Ahmedx and SQLBI
I used this article from SQLBI https://www.daxpatterns.com/month-related-calculations/ to solve this issue
Attaching solution just in case it helps anyone
Sincere Kudos to @Ahmedx and SQLBI
refer to the following
https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
Just implemented it- was reading the same article
This did not work too, the answer is still the same
This is because my measure Headcount, being evaluated, in itself is Date Dependent, I feel
Thanks for sharing your time on this with me, I am trying as well
ChatGPT for sure isn't being helpful- lol
@Ahmedx Hi There,
Thanks for helping me
I used this myself
And also tried your suggestion
With both of these, my Headcount becomes = Rolling Avg HC of 12 Months
This is becvause my Headcount formula shared above in question is dynamic and uses the Year and Month in Row to calculate itself dynamically each row
try adding the function REMOVEFILTERS(Calendar)
write the new measure like this
NewMeasure = CALCULATE ( [Headcount],
DATESINPERIOD('Calendar'[Date],MAX('Calendar'[Date]),-12,MONTH))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
114 | |
80 | |
78 | |
44 | |
39 |
User | Count |
---|---|
150 | |
116 | |
68 | |
64 | |
58 |