Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Headcount Calculation (Monthwise, quarterwise, yearwise)

Headcount report on POWER BI

Year

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

2024

450

434

424

432

433

 

 

 

 

 

 

 

2023

456

435

420

410

413

400

409

403

402

405

400

389

2022

330

345

378

356

355

350

367

360

389

379

380

387

 

Hey, I am working on HR data on POWER BI whereby I have to calculate headcount i.e. all the active employees present on a particular day....we have with us start date of an employee....so let's say if I want to capture headcount on 31-Mar-24 or 30-Oct-23 what formula should I use so that I can capture all the active employees on that particular date and not just new hires

 

If I want to build headcount report like this in power BI where I am having columns like start date of employee, end date of employee, name, title, level, etc,

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

    Thank you for ExcelMonke answer , and I have other suggestions:

    Below is my table:

    It has employee columns, start date and end date and status columns for active or inactive.

    The following DAX might work for you:

    Measure = 
      CALCULATE(COUNT('Table'[Customer]),FILTER('Table','Table'[Flag] = "active"))

    The final output is shown in the following figure:

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • ExcelMonke's avatar
    ExcelMonke
    Impactful Individual

    Hello, 
    Assuming your data is straightforward (i.e. you have 1 date column, 1 column for employee, 1 column for active status, etc.), you should be able to complete this with a simple date slicer on your report.

    If it's more complex, please share a bit more about how your data is structured. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Thank you for ExcelMonke answer , and I have other suggestions:

    Below is my table:

    It has employee columns, start date and end date and status columns for active or inactive.

    The following DAX might work for you:

    Measure = 
      CALCULATE(COUNT('Table'[Customer]),FILTER('Table','Table'[Flag] = "active"))

    The final output is shown in the following figure:

    Best Regards,

    Xianda Tang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.