Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Count total working days

I have 2 tables:   attendance table: Id Name Date New id attendance  Clock in Clock Out Absent 1 Lebron 6/1/2022  1-06  00:00:00  00:00  TRUE 1 Lebron 6/2/2022  1-06   07:...
  • Jihwan_Kim's avatar
    4 years ago

    Hi,

    If you can create a relationship between two tables via New Id column and New Id Attendance column, please try using RELATEDTABLE DAX function for creating a calculated column.

    Please check the below picture and the attached pbix file.

     

     

    Total days work CC =
    COUNTROWS (
        FILTER ( RELATEDTABLE ( Attendance ), Attendance[Absent] = "Present" )
    )