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   Month Closing Headcount Avergae HC - Average function Oct 3585 3585 ...
  • ryan_mayu's avatar
    3 years ago

    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