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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
GJ217
Resolver III
Resolver III

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
GJ217
Resolver III
Resolver III

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
GJ217
Resolver III
Resolver III

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

@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.

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

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.