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
EmployeeIDNameDepartmentIDHireDateLeaveDateSalaryEmploymentTypeStatus
101Sophie Lang11 Oct 202051500Full-timeActive
102Noah Walker11 Nov 202529600Part-timeActive
103Sophie Hayes11 Sep 202654100Full-timeActive
104Sam Price11 Aug 202460300Full-timeActive
105Ben Price11 Mar 201831 May 202666600Full-timeLeft
106Olivia Hughes11 Apr 202066000Full-timeActive
107Ben Bennett21 Nov 201244000Part-timeActive
108Jack Hughes21 Feb 201647600Full-timeActive
109Ben Hayes21 Apr 202131 Aug 202551000Full-timeLeft
110Lucy Clarke21 Oct 201957700Full-timeActive
111Ravi Ali21 Jul 202231 Mar 202548700Full-timeLeft
112Ben Foster21 Mar 201952100Full-timeActive

Showing the first 12 of 46 rows.

Department 6 rows, 3 columns
DepartmentIDDepartmentDivision
1AdministrationAdministration
2SalesSales
3ProductionOperations
4LogisticsOperations
5ITAdministration
6Customer ServiceSales
Absence 486 rows, 5 columns
AbsenceIDDateEmployeeIDTypeDays
11 Jan 2025111Sick leave2
22 Jan 2025101Vacation9
33 Jan 2025127Sick leave4
43 Jan 2025127Sick leave10
54 Jan 2025142Sick leave2
66 Jan 2025104Sick leave4
76 Jan 2025118Vacation3
87 Jan 2025124Sick leave4
97 Jan 2025134Vacation6
1012 Jan 2025113Vacation7
1115 Jan 2025115Sick leave4
1216 Jan 2025117Sick leave2

Showing the first 12 of 486 rows.

Measures: [Absence Days]

Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

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
EmployeeIDNameDepartmentIDHireDateLeaveDateSalaryEmploymentTypeStatus
101Sophie Lang11 Oct 202051500Full-timeActive
102Noah Walker11 Nov 202529600Part-timeActive
103Sophie Hayes11 Sep 202654100Full-timeActive
104Sam Price11 Aug 202460300Full-timeActive
105Ben Price11 Mar 201831 May 202666600Full-timeLeft
106Olivia Hughes11 Apr 202066000Full-timeActive
107Ben Bennett21 Nov 201244000Part-timeActive
108Jack Hughes21 Feb 201647600Full-timeActive
109Ben Hayes21 Apr 202131 Aug 202551000Full-timeLeft
110Lucy Clarke21 Oct 201957700Full-timeActive
111Ravi Ali21 Jul 202231 Mar 202548700Full-timeLeft
112Ben Foster21 Mar 201952100Full-timeActive

Showing the first 12 of 46 rows.

Measures: [Headcount]

Department 6 rows, 3 columns
DepartmentIDDepartmentDivision
1AdministrationAdministration
2SalesSales
3ProductionOperations
4LogisticsOperations
5ITAdministration
6Customer ServiceSales
Absence 486 rows, 5 columns
AbsenceIDDateEmployeeIDTypeDays
11 Jan 2025111Sick leave2
22 Jan 2025101Vacation9
33 Jan 2025127Sick leave4
43 Jan 2025127Sick leave10
54 Jan 2025142Sick leave2
66 Jan 2025104Sick leave4
76 Jan 2025118Vacation3
87 Jan 2025124Sick leave4
97 Jan 2025134Vacation6
1012 Jan 2025113Vacation7
1115 Jan 2025115Sick leave4
1216 Jan 2025117Sick leave2

Showing the first 12 of 486 rows.

Measures: [Absence Days], [Sick Days]

Date 730 rows, 4 columns
DateYearMonthMonthName
1 Jan 202520251Jan
2 Jan 202520251Jan
3 Jan 202520251Jan
4 Jan 202520251Jan
5 Jan 202520251Jan
6 Jan 202520251Jan
7 Jan 202520251Jan
8 Jan 202520251Jan
9 Jan 202520251Jan
10 Jan 202520251Jan
11 Jan 202520251Jan
12 Jan 202520251Jan

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.

Next: case 5, salary structure

Average and median salary per department and years of service as a column.

Go to case 5

Back to case 3 or the course overview.

Write to us

Choose language

Select your preferred language