Forum Discussion
Anonymous
1 year agoNot applicable
Distinct Count against multiple criteria in the same column
Hi all, Been trying to work out a distinct count but can't seem to get it work with the results I've found. I am trying to calculate the number of personnel within the organisation that have com...
- 1 year ago
You could create a calculated column like
Competent = VAR RequiredCourses = { "A", "B" } VAR CompletedCourses = CALCULATETABLE ( VALUES ( 'Table'[Course] ), ALLEXCEPT ( 'Table', 'Table'[Employee ID] ) ) VAR Matches = INTERSECT ( CompletedCourses, RequiredCourses ) VAR Result = IF ( COUNTROWS ( Matches ) = COUNTROWS ( RequiredCourses ), "Yes", "No" ) RETURN Result
Uzi2019
Community Champion
1 year agoHi Anonymous
Try this measure.
Count =
CALCULATE(DISTINCTCOUNT(Course[EmployeeID]),FILTER(ALL(Course),Course[Course]="A" || Course[Course]="B"),Course[Competent]="Yes")
I hope I answered your question!