Project Hub

Project · HR attrition dashboard

An early-warning list of 295 current employees with three or more risk flags

The problem

An HR team sees one in six employees leave but cannot tell where it happens, why, or who will go next, so retention money gets spread across everyone.

The solution

A Power BI report on a clean star schema that shows where people leave, the drivers behind it and a risk score for every employee, ending in five actions, each with a KPI and an owner.

How it works

  • Clean: 1,470 employees, 35 columns, cleaned in one Power Query step
  • Model: A star schema: one employee fact, seven dimensions, one-way filters
  • Measure: 15 DAX measures; outliers by the 1.5 × IQR rule
  • Score: Six risk flags: overtime, single, entry level, no stock options, two years or less, low satisfaction
  • Show: A home page and three pages: overview, drivers, trends and outliers
  • Act: Five actions with a KPI and owner each, and who to talk to first

A closer look

Power BI Overview page: 1,470 employees, 237 leavers, a 16.12% attrition rate and 295 at risk now, with attrition by marital status, department, tenure and job role.
The Overview page in Power BI.
Power BI Drivers page: 30.53% attrition with overtime against 10.44% without, a 2,046 monthly pay gap between stayers and leavers, 43.04% of leavers in their first two years, and attrition rising with each risk flag.
The Drivers page in Power BI.
Power BI Trends and Outliers page: 114 high-income outliers above 16,581 a month with 4.39% attrition, 104 tenure outliers, attrition by education field, involvement and travel, and income plotted against years at the company.
The Trends and Outliers page in Power BI.
Star schema of the HR model: one employee fact table linked to seven dimensions such as department, job role and overtime.
The star schema: one fact table, seven dimensions.
Attrition rate by department and by job role, with the roles above the company rate in red.
Where people leave.
Four drivers of attrition: overtime, the first years at the company, entry job level and lower pay, each with its attrition rate.
The drivers behind it.

The code

Risk Flags =
VAR _OverTime = RELATED ( dim_overtime[OverTime] ) = "Yes"
VAR _Single = RELATED ( dim_marital_status[MaritalStatus] ) = "Single"
VAR _EntryLevel = fact_employee[JobLevel] = 1
VAR _NoStock = fact_employee[StockOptionLevel] = 0
VAR _EarlyTenure = fact_employee[YearsAtCompany] <= 2
VAR _LowEnvSat = fact_employee[EnvironmentSatisfaction] = 1
dax/measures.dax

The impact

  • Where: Sales has the highest rate; Sales Representatives leave at 39.8%.
  • Why: overtime staff leave at 30.5% against 10.4%; the first two years hold 43% of leavers.
  • Who next: 295 current staff carry three or more of the six flags.
  • What to do: five actions, each with a KPI and an owner.

The result

1,470 employee records: attrition climbs from 4.6% with no risk flags to 75% with five, and 295 current staff carry three or more.

Built with

  • Power BI
  • DAX
  • Power Query
  • Star schema
  • SQL