Case 4: sick days per employee
The Absence table mixes vacation and sick leave. You separate the sick days and calculate them per employee, so that a department with 12 people does not look worse than one with 4.
In short: CALCULATE([Absence Days], Absence[Type] = "Sick leave") counts only the sick days. DIVIDE([Sick Days], [Headcount]) divides them by the headcount at the end of the period.
Task 1: sick days
Task [Absence Days] counts vacation and sick leave together. Create the measure "Sick Days": [Absence Days], but only for the type Sick leave.
Employee 46 rows, 8 columns
| EmployeeID | Name | DepartmentID | HireDate | LeaveDate | Salary | EmploymentType | Status |
|---|---|---|---|---|---|---|---|
| 101 | Sophie Lang | 1 | 1 Oct 2020 | 51500 | Full-time | Active | |
| 102 | Noah Walker | 1 | 1 Nov 2025 | 29600 | Part-time | Active | |
| 103 | Sophie Hayes | 1 | 1 Sep 2026 | 54100 | Full-time | Active | |
| 104 | Sam Price | 1 | 1 Aug 2024 | 60300 | Full-time | Active | |
| 105 | Ben Price | 1 | 1 Mar 2018 | 31 May 2026 | 66600 | Full-time | Left |
| 106 | Olivia Hughes | 1 | 1 Apr 2020 | 66000 | Full-time | Active | |
| 107 | Ben Bennett | 2 | 1 Nov 2012 | 44000 | Part-time | Active | |
| 108 | Jack Hughes | 2 | 1 Feb 2016 | 47600 | Full-time | Active | |
| 109 | Ben Hayes | 2 | 1 Apr 2021 | 31 Aug 2025 | 51000 | Full-time | Left |
| 110 | Lucy Clarke | 2 | 1 Oct 2019 | 57700 | Full-time | Active | |
| 111 | Ravi Ali | 2 | 1 Jul 2022 | 31 Mar 2025 | 48700 | Full-time | Left |
| 112 | Ben Foster | 2 | 1 Mar 2019 | 52100 | Full-time | Active |
Showing the first 12 of 46 rows.
Department 6 rows, 3 columns
| DepartmentID | Department | Division |
|---|---|---|
| 1 | Administration | Administration |
| 2 | Sales | Sales |
| 3 | Production | Operations |
| 4 | Logistics | Operations |
| 5 | IT | Administration |
| 6 | Customer Service | Sales |
Absence 486 rows, 5 columns
| AbsenceID | Date | EmployeeID | Type | Days |
|---|---|---|---|---|
| 1 | 1 Jan 2025 | 111 | Sick leave | 2 |
| 2 | 2 Jan 2025 | 101 | Vacation | 9 |
| 3 | 3 Jan 2025 | 127 | Sick leave | 4 |
| 4 | 3 Jan 2025 | 127 | Sick leave | 10 |
| 5 | 4 Jan 2025 | 142 | Sick leave | 2 |
| 6 | 6 Jan 2025 | 104 | Sick leave | 4 |
| 7 | 6 Jan 2025 | 118 | Vacation | 3 |
| 8 | 7 Jan 2025 | 124 | Sick leave | 4 |
| 9 | 7 Jan 2025 | 134 | Vacation | 6 |
| 10 | 12 Jan 2025 | 113 | Vacation | 7 |
| 11 | 15 Jan 2025 | 115 | Sick leave | 4 |
| 12 | 16 Jan 2025 | 117 | Sick leave | 2 |
Showing the first 12 of 486 rows.
Measures: [Absence Days]
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
CALCULATE takes the existing measure and changes only the filter on the type. The lesson on CALCULATE explains how it works. A measure built on a measure is better than a second sum: if the definition of absence days changes, the sick days change with it.
Task 2: sick days per employee
Task Large departments have more sick days simply because more people work there. Create the measure "Sick Days per Employee": sick days divided by headcount, using DIVIDE.
Employee 46 rows, 8 columns
| EmployeeID | Name | DepartmentID | HireDate | LeaveDate | Salary | EmploymentType | Status |
|---|---|---|---|---|---|---|---|
| 101 | Sophie Lang | 1 | 1 Oct 2020 | 51500 | Full-time | Active | |
| 102 | Noah Walker | 1 | 1 Nov 2025 | 29600 | Part-time | Active | |
| 103 | Sophie Hayes | 1 | 1 Sep 2026 | 54100 | Full-time | Active | |
| 104 | Sam Price | 1 | 1 Aug 2024 | 60300 | Full-time | Active | |
| 105 | Ben Price | 1 | 1 Mar 2018 | 31 May 2026 | 66600 | Full-time | Left |
| 106 | Olivia Hughes | 1 | 1 Apr 2020 | 66000 | Full-time | Active | |
| 107 | Ben Bennett | 2 | 1 Nov 2012 | 44000 | Part-time | Active | |
| 108 | Jack Hughes | 2 | 1 Feb 2016 | 47600 | Full-time | Active | |
| 109 | Ben Hayes | 2 | 1 Apr 2021 | 31 Aug 2025 | 51000 | Full-time | Left |
| 110 | Lucy Clarke | 2 | 1 Oct 2019 | 57700 | Full-time | Active | |
| 111 | Ravi Ali | 2 | 1 Jul 2022 | 31 Mar 2025 | 48700 | Full-time | Left |
| 112 | Ben Foster | 2 | 1 Mar 2019 | 52100 | Full-time | Active |
Showing the first 12 of 46 rows.
Measures: [Headcount]
Department 6 rows, 3 columns
| DepartmentID | Department | Division |
|---|---|---|
| 1 | Administration | Administration |
| 2 | Sales | Sales |
| 3 | Production | Operations |
| 4 | Logistics | Operations |
| 5 | IT | Administration |
| 6 | Customer Service | Sales |
Absence 486 rows, 5 columns
| AbsenceID | Date | EmployeeID | Type | Days |
|---|---|---|---|---|
| 1 | 1 Jan 2025 | 111 | Sick leave | 2 |
| 2 | 2 Jan 2025 | 101 | Vacation | 9 |
| 3 | 3 Jan 2025 | 127 | Sick leave | 4 |
| 4 | 3 Jan 2025 | 127 | Sick leave | 10 |
| 5 | 4 Jan 2025 | 142 | Sick leave | 2 |
| 6 | 6 Jan 2025 | 104 | Sick leave | 4 |
| 7 | 6 Jan 2025 | 118 | Vacation | 3 |
| 8 | 7 Jan 2025 | 124 | Sick leave | 4 |
| 9 | 7 Jan 2025 | 134 | Vacation | 6 |
| 10 | 12 Jan 2025 | 113 | Vacation | 7 |
| 11 | 15 Jan 2025 | 115 | Sick leave | 4 |
| 12 | 16 Jan 2025 | 117 | Sick leave | 2 |
Showing the first 12 of 486 rows.
Measures: [Absence Days], [Sick Days]
Date 730 rows, 4 columns
| Date | Year | Month | MonthName |
|---|---|---|---|
| 1 Jan 2025 | 2025 | 1 | Jan |
| 2 Jan 2025 | 2025 | 1 | Jan |
| 3 Jan 2025 | 2025 | 1 | Jan |
| 4 Jan 2025 | 2025 | 1 | Jan |
| 5 Jan 2025 | 2025 | 1 | Jan |
| 6 Jan 2025 | 2025 | 1 | Jan |
| 7 Jan 2025 | 2025 | 1 | Jan |
| 8 Jan 2025 | 2025 | 1 | Jan |
| 9 Jan 2025 | 2025 | 1 | Jan |
| 10 Jan 2025 | 2025 | 1 | Jan |
| 11 Jan 2025 | 2025 | 1 | Jan |
| 12 Jan 2025 | 2025 | 1 | Jan |
Showing the first 12 of 730 rows.
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
The measure [Headcount] from case 1 is already set up here. DIVIDE returns blank instead of an error when a department has nobody on the cutoff date.
Common mistakes
Text spelled differently
Comparing with "sick leave" still works, because text comparisons in DAX ignore upper and lower case. With "Sick" or a trailing space, however, the filter finds nothing and the measure stays blank. You see the exact value in a slicer or in table view.
Divided by everyone
With COUNTROWS(Employee) in the denominator, people who already left count too. The rate then looks better than it is.
In real Power BI
- Sickness data is health data and specially protected in many countries. Reports therefore usually show it per department, never per person, and hide very small departments. What is allowed depends on the data protection rules and policies in your company.
- A common absence rate relates sick days to scheduled working days. For that you need the working days per person, for example from a calendar with public holidays and the work schedule.
Check your result
- Task 1: In 2026 Production has 70 sick days, Customer Service 59.
- Task 2: Per employee Customer Service leads with 14.75 days, Production has the lowest value with 5.83 days.
Back to case 3 or the course overview.