Forum Discussion

AndrewDavies437's avatar
4 years ago
Solved

DISTINCTCOUNT when unfiltered

Hello,  I have a table (as above) where I am counting the distinct number of policies companywide. I also want to be able to filter by employee to show their distinct number of policies.    ...
  • jdbuchanan71's avatar
    4 years ago

    AndrewDavies437 

    You can use SUMX over the list of employees to get the count you are looking for.  I don't know how your model is set up but this would be if you had a seperate table for Employees and one for Policies.

    Employee Policy Count = 
    SUMX ( VALUES ( Employees[Employee_ID] ), CALCULATE ( DISTINCTCOUNT ( Policies[Policy Number] ) ) )