Count qualified employees based on their distinct or common training
I have two tables as the screenshot below. I have created a measure that counts the qualified employees based on their training results.
The measure to count the qualified employees
Qulaified Employees = CALCULATE(DISTINCTCOUNT(Table1[Employee]),FILTER(Table1,[Pass or not]="Pass"))
My issue is whenever there is a common training between 2 different qualifications, the measure doubles the counts of the qualified employees.
As you can see in the screenshot, I have no employee who is qualified for ( qualification4 ) though it's counting as one due to the common training between qualification1 and qualification4, I'm trying to make a measure which does this dynamically and not hard coded.