Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello All.
I am having trouble with calculating headcount, and would greatly appreciate your help.
I have two tables:
1. Employees - employee ID, hiring date, termination date
2. Dates
I need to calculate:
Headcount on a date - all hired employees before that date, not considering terminated employees before that date
Headcount for the month = all employees on the first day of the month, plus newly hired, minus terminated for the month
Headcount for the year = average of headcount for the months of that year
Below are my DAX formulas:
Headcount on a date =
I pretty much get the same numbers from each measure but this is not what I need.
If anyone can advise how I can handle this issue, that would be great!
Best regards,
Tamila
@Tamila , Try if this blog and file can help
Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
@amitchandak Thank you very much for your suggestion. Tried the following formula:
Current Employees = CALCULATE(COUNTx(FILTER(Employee,Employee[Start Date]<=max('Date'[Date]) && (ISBLANK(Employee[End Date]) || Employee[End Date]>max('Date'[Date]))),(Employee[Employee Id ])),CROSSFILTER(Employee[Start Date],'Date'[Date],None))However, same story - for 2016-2022 correct result, for 2023 it does not count employees hired in February 2023(
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |