top of page

Attrition Analysis

Hey everyone! I recently completed a final exam for my Business Intelligence course at my campus, UII. I choose to analyze employee attrition data from a company, let’s call it "Company X."

🔗 Here’s a link to the full interactive dashboard where you can explore the results: Power BI Dashboard

Project 11 (1).png

The Challenge

Company X employs approximately 1300 employees this year. In the previous year, around 15% of these employees left the company, necessitating the replacement of theseemployees with new hires from the job market. This attrition rate is a concern for management due to several reasons:

  • Project Delays: The departure of employees leads to delays in ongoing projects, making it challenging to meet deadlines and potentially harming the company's reputation among consumers and partners.

  • Recruitment Costs: Maintaining a substantial recruitment department to continuously find and hire new talent incurs significant costs.

  • Training Costs: New employees require training and time to acclimate to the company, leading to additional expenses and temporary reductions in productivity.

Given these challenges, it is crucial to understand and model employee attrition to mitigate its impact. The goal of this analysis is to use historical employee data to model attrition using XGBoost with PyCaret, and then apply this model to predict attrition for the current year's employees. The insights gained from this analysis will help HR management make informed decisions to reduce employee turnover and improve retention strategies.

Here’s How I Tackled It

1. Understanding the Data

I worked with a dataset from Kaggle containing 4,410 rows and 31 columns. The data included:

  • General employee details (age, job role, income, etc.).

  • Employee survey results about their satisfaction and work-life balance.

  • Manager performance feedback.

  • Work duration details.

​​

The company’s major issues were:

  • Project delays caused by employee departures.

  • High recruitment and training costs for new hires.

2. Data Preprocessing

To ensure the data was ready for analysis, I:

  • Cleaned missing values by replacing them with the mean or median.

  • Transformed categorical data into user-friendly formats (e.g., job satisfaction levels as "Low," "Medium," "High").

  • Organized the dataset using a star schema in Power BI for efficient querying.

Screenshot 2024-11-16 123826.png

In Power BI, creating measurements (measures) using DAX (Data Analysis Expressions) is crucial for deriving actionable insights and making data-driven decisions. Each measurement provides specific insights into different aspects of the data. Here are the measurements created along with the DAX code:​

image.png
image.png
image.png
image.png

3. Data Analysis & Visualization

Using Power BI, I created an interactive dashboard to answer key business questions such as:

  • What’s the average job satisfaction level across departments?

  • How does marital status impact attrition?

  • Which department experiences the highest turnover?

​​

Some visualizations I included:

  • Pie Chart: To show the distribution of employees by marital status.

  • Bar Chart: To explore how job satisfaction correlates with attrition rates.

  • Tree Map: To highlight employees with the highest total working years.

4. Machine Learning for Prediction

I used PyCaret and XGBoost to predict the company’s attrition rate. The model estimated that 16% of employees are likely to leave, which highlights a significant challenge for HR. These insights can help the company design better retention strategies, like improving job satisfaction or manager-employee relationships.

Project 12.png

✨ Recommendations and Insights ✨

Project 14 (2).png

Target retention programs in departments with high attrition rates, such as Research & Development, to improve job satisfaction and career growth opportunities.

Vector (1).png
Project 14 (2).png

Tackle issues like career advancement, workload balance, and compensation, as low job satisfaction is not the only cause of employee turnover.

Vector (2).png
Project 14 (2).png

Invest in managerial training to improve leadership and foster long-term relationships between managers and employees, particularly for those with shorter tenure under current management.

Vector.png
bottom of page