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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
MDeemter
Frequent Visitor

Calculating Employee turnover rate per month

Hi guys,

 

Eventhough I have read several posts on this topic, non seem to answer the question(s) that I have, so here I go:

I am trying to calculate the monthly turonver rate of my employees. 
The tables and columns present are:

1. A datetable

2. An employee table with:

- Employee ID
- Starting Date

- Termination Date

Preferably I would like the turnover rate to be calculated as:
Number of terminations in given month / Average amount of employees in given month. 
However, if this is too much of a challenge it could also be:
Number of terminations in given month / Amount of employees at beginning of the month.

I am really struggling with the relations and the calculations to make this work.

Can someone please tell me step by step how to make this work. 
Would be huge 🙂 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MDeemter 

 

Please try this:

Here I create a set of sample:

vzhengdxumsft_0-1723518389698.pngvzhengdxumsft_1-1723518396339.png

Then add a measure:

MEASURE =
VAR _currentdate =
    MAX ( 'Table'[Date] )
VAR _terminationsnumofmonth =
    COUNTROWS (
        FILTER (
            ALLSELECTED ( employe ),
            MONTH ( 'employe'[Termination Date] ) = MONTH ( _currentdate )
        )
    )
VAR _beginningofmonthnum =
    COUNTROWS (
        FILTER (
            ALLSELECTED ( employe ),
            'employe'[Starting Date]
                < DATE ( YEAR ( _currentdate ), MONTH ( _currentdate ), 1 )
        )
    )
        - COUNTROWS (
            FILTER (
                ALLSELECTED ( employe ),
                'employe'[Termination Date]
                    < DATE ( YEAR ( _currentdate ), MONTH ( _currentdate ), 1 )
            )
        )
RETURN
    _terminationsnumofmonth / _beginningofmonthnum

The result is as follow:

vzhengdxumsft_2-1723518514298.pngvzhengdxumsft_3-1723518524397.png

 

 

Best Regards

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @MDeemter 

 

Please try this:

Here I create a set of sample:

vzhengdxumsft_0-1723518389698.pngvzhengdxumsft_1-1723518396339.png

Then add a measure:

MEASURE =
VAR _currentdate =
    MAX ( 'Table'[Date] )
VAR _terminationsnumofmonth =
    COUNTROWS (
        FILTER (
            ALLSELECTED ( employe ),
            MONTH ( 'employe'[Termination Date] ) = MONTH ( _currentdate )
        )
    )
VAR _beginningofmonthnum =
    COUNTROWS (
        FILTER (
            ALLSELECTED ( employe ),
            'employe'[Starting Date]
                < DATE ( YEAR ( _currentdate ), MONTH ( _currentdate ), 1 )
        )
    )
        - COUNTROWS (
            FILTER (
                ALLSELECTED ( employe ),
                'employe'[Termination Date]
                    < DATE ( YEAR ( _currentdate ), MONTH ( _currentdate ), 1 )
            )
        )
RETURN
    _terminationsnumofmonth / _beginningofmonthnum

The result is as follow:

vzhengdxumsft_2-1723518514298.pngvzhengdxumsft_3-1723518524397.png

 

 

Best Regards

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

Strangely this works on your data. But if I copy the measure and fill in my table and columnnames, the percentages are all negatives and far from what they should be... 

MDeemter
Frequent Visitor

Also I might add that the report has to be dynamic, so it should be possible to select a specific month with a slicer. 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.