Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Average Headcount Measure for Fiscal Year

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!

 

Average Headcount FY 2.jpgAverage Headcount FY.jpg

Avg. Headcount FY = 
VAR v_fydates = DATESINPERIOD(DimDates[Date], MAX(DimDates[Date]),12,MONTH)
RETURN
AVERAGEX(v_fydates, [Headcount])

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

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])

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

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])

 

AjithPrasath
Resolver II
Resolver II

@Anonymous ,

 

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.

Anonymous
Not applicable

Hi @AjithPrasath 

 

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
    )
)
amitchandak
Super User
Super User

@Anonymous , 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)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak 

 

I've appplied the above measure but the figure is comming up to 11112, any other ways to do this?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.