Skip to content

HR - Staff Turnover, based on Leaving Dates

>> Download the sample (Power BI)

This sample shows Staff Turnover over time, based on each staff member’s leaving date.

Current Staff =
CALCULATE (
COUNTROWS ( Staff_Levels ),
FILTER (
VALUES ( Staff_Levels[Start Date] ),
Staff_Levels[Start Date] <= MAX ( Calendar_Table[Date] )
),
FILTER (
VALUES ( Staff_Levels[End Date] ),
OR (
Staff_Levels[End Date] >= MIN ( Calendar_Table[Date] ),
ISBLANK ( Staff_Levels[End Date] )
)
)
)
Staff Turnover =
CALCULATE (
COUNTROWS ( Staff_Levels ),
FILTER (
VALUES ( Staff_Levels[End Date] ),
Staff_Levels[End Date] <= MAX ( Calendar_Table[Date] )
),
Staff_Levels[End Date] <> BLANK ()
)
Calendar_Table =
GENERATE (
CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2019, 12, 31 ) ),
VAR currentDay = [Date]
VAR Day =
DAY ( currentDay )
VAR Month =
MONTH ( currentDay )
VAR Year =
YEAR ( currentDay )
RETURN
ROW ( "Day", day, "Month", month, "Year", year )
)