Built with datascienceportfol.io

Absenteeism Project

Project photo

Skills

About this project

 
--Importing data into Power Bi Desktop using Direct Query
Select 
a.ID,
r.Reason,
a.Month_of_absence,
a.body_mass_index,
CASE WHEN Body_mass_index < 18.5 Then 'Underweight'
     WHEN Body_mass_index between 18.5 and 24.9  Then 'Healthy Weight'
WHEN Body_mass_index between 25 and 30 Then 'Overweight'
     WHEN Body_mass_index > 18.5 Then 'Obese'
  ELSE 'Unknown' end as BMI_Category,
CASE WHEN Month_of_absence IN (12,1,2) then 'Winter'
     WHEN Month_of_absence IN (3,4,5) then 'Spring'
WHEN Month_of_absence IN (6,7,8) then 'Summer'
WHEN Month_of_absence IN (19,10,11) then 'Fall'
Else 'Unknown' end as Season_Names,
a.Month_of_absence,
a.Day_of_the_week,
a.Transportation_expense,
a.Education,
a.Son,
a.Social_drinker,
a.Social_smoker,
a.Pet,
a.Disciplinary_failure,
a.Age,
a.Work_load_Average_day,
a.Absenteeism_time_in_hours
from 
Absenteeism_at_work a 
Left JOIN compensation c on a.id = c.id 
Left JOIN Reasons r on a.Reason_for_absence = r.Number