Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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

     

    or a measure

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

    pls see the attachment below

6 Replies

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

     

    or a measure

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

    pls see the attachment below

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Yes we have fiscal year concept.

      The solution worked which was provided on trail message.

       

      Thanks!