Forum Discussion

New_be's avatar
New_be
Helper V
3 years ago
Solved

Conditional sum: Consecutive date and non-consecutive date

Hi expert,

 

Scenario:

I have a report that needs me to calculate the frequency of absenteeism impact per employee. The condition is, 1 date will be count as 1, and consecutive date will also be count as 1. If the consecutive date involve 2 different week, then it will be count as 2 and not 1. If 1 date (non-consecutive) and a consecutive dates appear on the same week, the sum of frequency will be 2.

 

Problem (please refer below image as a reference):

Problem appear when I need to calculate the frequency of the absenteeism where on the same week (in below case is week 20) I have 2 types of absenteeism. First is non-consecutive date, second is consecutive dates. The way I calculated now will not return 2 in sum, but it will only return 1 since my code is -> DISTINCTCOUNT(Week). Can somebody please guide me on how I can tackle this issue? Thanks in advance! 😊 

 

 

11 Replies