Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Total Employee Count by Month

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!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

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.

 

Untitled.png

 

Employee count: =
COUNTROWS (
    FILTER (
        Employee,
        Employee[Hire Date] <= MAX ( 'Date'[Date] )
            && OR (
                Employee[Terminatino Date] >= MIN ( 'Date'[Date] ),
                Employee[Terminatino Date] = BLANK ()
            )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

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.

 

Untitled.png

 

Employee count: =
COUNTROWS (
    FILTER (
        Employee,
        Employee[Hire Date] <= MAX ( 'Date'[Date] )
            && OR (
                Employee[Terminatino Date] >= MIN ( 'Date'[Date] ),
                Employee[Terminatino Date] = BLANK ()
            )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.