I have 2 tables:
And employee table :
so i want to create a new column in the employee table of how many days an employee worked i want something like:
Go to Solution.
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 =
FILTER ( RELATEDTABLE ( Attendance ), Attendance[Absent] = "Present" )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
View solution in original post
Hi @eliasayy ,
Maybe you can try to use a measure.
COUNTROWS ( attendance ),
ALL ( attendance ),
attendance[New id attendance ]
= SELECTEDVALUE ( attendance[New id attendance ] )
&& attendance[Name] = SELECTEDVALUE ( attendance[Name] )
&& attendance[Absent] = " Present"
Best RegardsCommunity Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.