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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Anonymous
Not applicable

Average Headcount Calculation

I need to calculate average headcount 

 

Will need help in arrving at below number in power bi. My excel look this

 

MonthClosing HeadcountAvergae HC - Average function
Oct35853585
Nov35883586.5
Dec35953589.333
Jan36013592.25
Feb35813590
Mar36053592.5
Apr36133595.429
May36163598
Jun36723606.222
Jul37233617.9
Aug37493629.818
Sep37773642.083
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

1. you need to have a date column or year month column

 

2. you can create a column

Column = AVERAGEX(FILTER('Table','Table'[year month]<=EARLIER('Table'[year month])),'Table'[Closing Headcount])

1.PNG

 

or a measure

Measure = AVERAGEX(FILTER(all('Table'),'Table'[year month]<=max('Table'[year month])),'Table'[Closing Headcount])

2.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Does the Financial Year run from October to September?  Also, share some data to work with (in a format that can be pasted in an MS Excel file.) or share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Yes we have fiscal year concept.

The solution worked which was provided on trail message.

 

Thanks!

ryan_mayu
Super User
Super User

@Anonymous 

1. you need to have a date column or year month column

 

2. you can create a column

Column = AVERAGEX(FILTER('Table','Table'[year month]<=EARLIER('Table'[year month])),'Table'[Closing Headcount])

1.PNG

 

or a measure

Measure = AVERAGEX(FILTER(all('Table'),'Table'[year month]<=max('Table'[year month])),'Table'[Closing Headcount])

2.PNG

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thanks , this worked

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Shaurya
Memorable Member
Memorable Member

Hi @Anonymous,

 

Use the following formula:

 

Average Headcount = SUMX('Table',IF('Table'[Month]<=EARLIER('Table'[Month]),'Table'[Closing],0)) / SUMX('Table',IF('Table'[Month]<=EARLIER('Table'[Month]),1,0))

 

Mark this post as a solution if that works for you!
Consider taking a look at my blog: How to Export Telemetry Data from Azure IoT Central into Power BI

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.