Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Count consecutive days of absence due to sickness, including weekends

Hello,

I am trying to find a way to calculate the number of consecutive days that employees were absent due to illness, including weekends.

 

In the data sample:
We have 2 different cases : for Adeline the payrool has put in the correct sickness absence information including the weekend but for John, the sick leave is entered exluding the weekend.

DateDayID Namecontract hours AbsenceAbsence DurationConsecutive absentConsecutive absence
(- 2 days) 
Hours to pay
28.01.2023S01Adeline 8 0008
29.01.2023S01Adeline 8 0008
30.01.2023M01Adeline 0Sickness8108
31.01.2023T01Adeline0Sickness8208
01.02.2023W01Adeline0Sickness8310
02.02.2023T01Adeline 0Sickness8420
03.02.2023F01Adeline 0Sickness8530
04.02.2023S01Adeline 8Sickness0640
05.02.2023S01Adeline 8Sickness0750
06.02.2023M01Adeline 8Sickness8860
07.02.2023T01Adeline 8Sickness8970
08.02.2023W01Adeline 8Sickness81080
09.02.2023T01Adeline 8 00 8
21.01.2023F02Jean DE8 00 8
22.01.2023S02Jean DE8 00 8
23.01.2023M02Jean DE8Sickness8118
24.01.2023T02Jean DE8Sickness00 8
25.01.2023W02Jean DE8Sickness00 8
26.01.2023T02Jean DE8Sickness00 8
27.01.2023F02Jean DE8Sickness8108
28.01.2023S02Jean DE0 0200
29.01.2023S02Jean DE0 0310
30.01.2023M02Jean DE8Sickness8428
31.01.2023T02Jean DE8Sickness8530
01.02.2023 02Jean DE8 0  8

 

What I need to have : 

  1. Count consecutive absences of an employee due to sickness, including weekend.
  2. If an employee was absent on Friday and he's still absent on Monday, the weekend must be counted even if the sikness absence was not entered in the system by the human resources department.
  3. Finally, I would like to add a column that allows me to count the first 2 days of work to be paid that are not covered by health insurance. (For example, John started getting sick on Friday, so we need to pay his Friday and Monday wages (excluding the weekend which is not a workday).
EmployeDate absenceConsecutive absence daysDays to be paidHours to pay
Adeline30-01-23 to 08-02-2310216 hours
Jean23-01-23 to 23-01-23118 hours
Jean27-01-23 to 31-01-235216 hours

 

Maybe it would be easier to count sickness absent excluding weekend ??

Thank you for your help. 

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.