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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
eliasayy
Impactful Individual
Impactful Individual

Count numbers of days an employee worked

hello I want to find the total days my employee worked, what is the formula for power bi given i have 2 tables , i want to create the column in the employee table , and the other table has list of daily attendance of each employee.

 

so this is my attendance table:

id- name- absent

1 -ari -True

1 -ari -Present

1 -ari -Present

2 -james -True

2 -james -True

2 -james -Present

 

i want in the employee table to add the days worked column to have:

id -name -days worked

1 -ari -2

2 -james -1

1 ACCEPTED SOLUTION
Avantika-Thakur
Solution Supplier
Solution Supplier

Hi @eliasayy ,

Assuming that there's a relationship between the Attendance Table and Employee Table based on the ID column,

you can try creating the below measure -

Measure = calculate(count(Attendance),ALLEXCEPT(Table,Table'Name'),filter(Table,Attendance = "Present"))

Hope this helps.

Please accept the solution if this answers your query

Thanks!

Avantika

View solution in original post

1 REPLY 1
Avantika-Thakur
Solution Supplier
Solution Supplier

Hi @eliasayy ,

Assuming that there's a relationship between the Attendance Table and Employee Table based on the ID column,

you can try creating the below measure -

Measure = calculate(count(Attendance),ALLEXCEPT(Table,Table'Name'),filter(Table,Attendance = "Present"))

Hope this helps.

Please accept the solution if this answers your query

Thanks!

Avantika

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors