Forum Discussion

dilumd's avatar
dilumd
Impactful Individual
7 years ago
Solved

Continuous Attendance

Hi Everyone,   I have below table with employee attendance data from which I need to identify whether there is any employee who has reported to work continuously for 7 days or more. Pls help, may d...
  • Zubair_Muhammad's avatar
    7 years ago

    dilumd

     

    Try this calculated column.

     It will identify the first day when consecutive 7 days start for each employee

    You can then use it as VISUAL filter

     

    Continuously_Present =
    VAR mycontinuousdays = 7
    RETURN
        IF (
            [Date] + mycontinuousdays
                - 1
                = CALCULATE (
                    MIN ( [Date] ),
                    FILTER (
                        Table1,
                        [EMP No] = EARLIER ( [EMP No] )
                            && [Index]
                                = EARLIER ( [Index] ) + mycontinuousdays
                                    - 1
                    )
                ),
            "Present"
        )