Forum Discussion

deboec's avatar
deboec
Helper I
4 years ago
Solved

Working Days per Employee

Hi,   I have a table that shows records for every activity of employees [Activity]: ID Activity_ID Employee_ID Date Duration Completed 1 1 90 2021/09/01 0 1 2 1 91 2021/09/01...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi deboec,

    You can add the 'activity id' field to the table visual and use the below measure formula to calculate workdays of each activity and grouped by employee:

    Days Activity =
    CALCULATE (
        DISTINCTCOUNT ( Activity[Date] ),
        FILTER ( ALLSELECTED ( Activity ), Activity[Completed] = 1 ),
        VALUES ( Activity[Activity_ID] )
    )

    Regards,

    Xiaoxin Sheng