Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi guys,
I was hoping to get some help with my measure. My goal is to create a measure that calculates the rolling average headcount for the past 12 months.I have created a headcount measure which is working fine, however when I try to use it to create the rolling total for past 12 months the rolling total measure returns error result.
Headcount =
var headcount =
CALCULATE(
DISTINCTCOUNT(Data[ID Number]),
Data[Hire Month]<=SELECTEDVALUE('Calendar'[YearMonthNo]),
OR(
Data[Termination Month]=BLANK(),
Data[Termination Month]>SELECTEDVALUE('Calendar'[YearMonthNo])
),
ALL('Calendar')
)
return
SWITCH(TRUE(),
SELECTEDVALUE('Calendar'[YearMonthNo])<TODAY()-1,headcount,
BLANK())
Thank you for your help!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |