- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate Rolling 12 Month Average Headcount
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
refer to the following
https://www.sqlbi.com/articles/rolling-12-months-average-in-dax/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try adding the function REMOVEFILTERS(Calendar)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
write the new measure like this
NewMeasure = CALCULATE ( [Headcount],
DATESINPERIOD('Calendar'[Date],MAX('Calendar'[Date]),-12,MONTH))
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - January 2025
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
Subject | Author | Posted | |
---|---|---|---|
02-13-2023 03:25 AM | |||
12-12-2023 10:33 AM | |||
01-18-2023 04:43 AM | |||
10-04-2021 01:32 PM | |||
07-11-2024 04:04 AM |
User | Count |
---|---|
102 | |
75 | |
44 | |
39 | |
32 |
User | Count |
---|---|
161 | |
87 | |
64 | |
46 | |
42 |