Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I'm getting a totally different figure below for my Average Headcount for Fiscal Year 23, can someone please check my measure below and correct where I've gone wrong. My page has a Fiscal Year filter and the FY Start Month is April in my dates calendar.
Any help with this is much appreciated!
Avg. Headcount FY =
VAR v_fydates = DATESINPERIOD(DimDates[Date], MAX(DimDates[Date]),12,MONTH)
RETURN
AVERAGEX(v_fydates, [Headcount])
Solved! Go to Solution.
The below measure works and brings my average headcount to 10766 which matches the Excel calculation in my screen shot.
Avg. Headcount FY = AVERAGEX(VALUES(DimDates[Month & Year]),[Headcount])
The below measure works and brings my average headcount to 10766 which matches the Excel calculation in my screen shot.
Avg. Headcount FY = AVERAGEX(VALUES(DimDates[Month & Year]),[Headcount])
@GJ217 ,
You can use the below code:
Avg. Headcount FY =
VAR v_fydates =
DATESINPERIOD(
DimDates[Date],
MAX(DimDates[Date]),
12,
MONTH
)
RETURN
AVERAGEX(
FILTER(DimDates, DimDates[Date] IN v_fydates),
[Headcount]
)
Best Regards,
Ajith Prasath
If this post helps, then please consider Accept it as the solution and give kudos to help the other members find it more quickly.
Thanks but this is giving me the same figure as Mar-23 11013 in my card visual, is there another way to write this so I can get the accurate figure for the 12 months in a fiscal year example provided in my screenshots?
Any help with this will be great for my development.
can you try this
Avg. Headcount FY =
CALCULATE(
AVERAGE([Headcount]),
DATESINPERIOD(
DimDates[Date],
MAX(DimDates[Date]),
-12,
MONTH
)
)
@GJ217 , Try like
Avg. Headcount FY =
VAR v_fydates = DATESINPERIOD(DimDates[Date], MAX(DimDates[Date]),12,MONTH)
RETURN
calculate(AVERAGEX(Values(DimDates[Month Year]), [Headcount]),v_fydates)
Hi @amitchandak
I've appplied the above measure but the figure is comming up to 11112, any other ways to do this?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
81 | |
52 | |
39 | |
35 |
User | Count |
---|---|
95 | |
79 | |
52 | |
49 | |
47 |