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.
I am trying to get a total employee count by month. So the idea is that I would have:
(New Hires + Existing Employees) - Terminations = Total Employees per month
I have a data table with each employees hire and term dates, but I can't seem to get Power BI to include an employee beyond their hire month.
TIA!
Solved! Go to Solution.
Hi,
I tried to create a sample pbix file like below.
I suggest having a Dim Date table, and the data model like below.
Please check the below picture and the attached pbix file.
Employee count: =
COUNTROWS (
FILTER (
Employee,
Employee[Hire Date] <= MAX ( 'Date'[Date] )
&& OR (
Employee[Terminatino Date] >= MIN ( 'Date'[Date] ),
Employee[Terminatino Date] = BLANK ()
)
)
)
Hi,
I tried to create a sample pbix file like below.
I suggest having a Dim Date table, and the data model like below.
Please check the below picture and the attached pbix file.
Employee count: =
COUNTROWS (
FILTER (
Employee,
Employee[Hire Date] <= MAX ( 'Date'[Date] )
&& OR (
Employee[Terminatino Date] >= MIN ( 'Date'[Date] ),
Employee[Terminatino Date] = BLANK ()
)
)
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 37 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |