TGViewer
Data Analytics Data Analytics @sqlspecialist ยท 111K subscribers
Post #2818 5.3K
๐Ÿš€ Data Analyst Project Series โ€“ Part 2

HR Analytics Dashboard Project

๐ŸŽฏ Project Goal
The goal of this project is to analyze employee data and create an HR Analytics Dashboard that helps companies understand:
โ€ข Employee attrition
โ€ข Employee performance
โ€ข Department-wise analysis
โ€ข Salary trends
โ€ข Employee satisfaction
โ€ข Hiring and retention insights

This is one of the most popular real-world Data Analyst projects because every company tracks employee performance and retention.

๐Ÿ›  STEP 1: Choose an HR Dataset

Recommended Datasets
Search on Kaggle:
โ€ข HR Analytics Dataset
โ€ข Employee Attrition Dataset
โ€ข IBM HR Analytics Dataset

๐Ÿ“‚ STEP 2: Understand the Dataset

Common Columns in HR Data
Column Name: Employee ID
Meaning: Unique employee number

Column Name: Age
Meaning: Employee age

Column Name: Gender
Meaning: Male/Female

Column Name: Department
Meaning: Department name

Column Name: Job Role
Meaning: Employee role

Column Name: Salary
Meaning: Employee salary

Column Name: Attrition
Meaning: Employee left or not

Column Name: Years at Company
Meaning: Work experience

Column Name: Satisfaction Score
Meaning: Employee satisfaction

Column Name: Performance Rating
Meaning: Employee performance

๐Ÿงน STEP 3: Data Cleaning
HR data usually contains:
โ€ข Missing values
โ€ข Duplicate employees
โ€ข Incorrect salary formats
โ€ข Inconsistent department names

โœ” Cleaning Tasks

Remove Duplicate Employees
Example:
Same Employee ID appearing multiple times.

Handle Missing Values
Check:
โ€ข Missing salary
โ€ข Missing department
โ€ข Empty performance ratings

Standardize Text
Example:
โ€ข โ€œHuman Resourcesโ€
โ€ข โ€œHRโ€
โ€ข โ€œhuman resourcesโ€

Convert all into one standard format.

Correct Data Types
Examples:
โ€ข Salary โ†’ Number
โ€ข Joining Date โ†’ Date
โ€ข Attrition โ†’ Yes/No

๐Ÿ“Š STEP 4: Define HR KPIs
KPIs are very important in HR Analytics.

Essential KPIs

โœ” Total Employees
COUNT(Employee_ID)

โœ” Attrition Count
COUNT(CASE WHEN Attrition = 'Yes' THEN 1 END)

โœ” Attrition Rate
(Employees_Left / Total_Employees) * 100

Purpose:
Measures employee turnover.

โœ” Average Salary
AVG(Salary)

โœ” Average Satisfaction Score
AVG(Satisfaction_Score)

๐Ÿ—„ STEP 5: HR Data Analysis Using SQL
Now start analyzing the HR data.

๐Ÿ“Œ SQL Query Examples

1. Attrition by Department
SELECT Department,
COUNT(*) AS Employees_Left
FROM HR_Data
WHERE Attrition = 'Yes'
GROUP BY Department
ORDER BY Employees_Left DESC;

2. Average Salary by Job Role
SELECT Job_Role,
AVG(Salary) AS Avg_Salary
FROM HR_Data
GROUP BY Job_Role
ORDER BY Avg_Salary DESC;

3. Employee Count by Gender
SELECT Gender,
COUNT(*) AS Employee_Count
FROM HR_Data
GROUP BY Gender;

4. Top Departments with Highest Satisfaction
SELECT Department,
AVG(Satisfaction_Score) AS Avg_Satisfaction
FROM HR_Data
GROUP BY Department
ORDER BY Avg_Satisfaction DESC;

๐Ÿ“ˆ STEP 6: Build HR Dashboard
Use:
โ€ข Power BI
โ€ข Tableau

๐ŸŽจ Dashboard Layout

Section 1: KPI Cards
Display:
โ€ข Total Employees
โ€ข Attrition Rate
โ€ข Average Salary
โ€ข Satisfaction Score

These should appear at the TOP.

Section 2: Charts

โœ” Bar Chart
Use for:
โ€ข Attrition by Department

โœ” Pie Chart
Use for:
โ€ข Gender Distribution

โœ” Line Chart
Use for:
โ€ข Hiring Trend Over Time

โœ” Heatmap
Use for:
โ€ข Performance vs Satisfaction

โœ” Tree Map
Use for:
โ€ข Department-wise Employee Distribution

๐ŸŽ› STEP 7: Add Dashboard Filters
Add slicers for:
โœ” Department
โœ” Gender
โœ” Job Role
โœ” Experience Level
โœ” Attrition Status

This makes the dashboard interactive.

๐ŸŽจ STEP 8: Improve Dashboard Design

Design Tips
โœ” Use HR-friendly colors
โœ” Avoid too many visuals
โœ” Keep important KPIs visible
โœ” Add icons where necessary
โœ” Maintain spacing and alignment
  • โค 8
More from @sqlspecialist
  1. Oct 8, 2026๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ Upgrโ€ฆ
  2. Oct 7, 2026๐Ÿ“Š Kandinsky 6.0 Video: AI-Powered Content Creation for Analysts The new Kandinsky 6.0 Vidโ€ฆ
  3. Oct 7, 2026Alternatively, depending on the Excel version and requirement, I could use functions suchโ€ฆ
  4. Oct 7, 2026๐Ÿ“Š Data Analyst Interview Series โ€” Part 5 Guys, let's continue our Data Analyst Interviewโ€ฆ
  5. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  6. Oct 7, 2026๐Ÿ”Ÿ What is the difference between UNION and JOIN? Sample Answer: "JOIN combines columns frโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’