Forum Discussion
AndrewDavies437
Helper I
4 years agoDISTINCTCOUNT 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. ...
- 4 years ago
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] ) ) )
jdbuchanan71
Super User
4 years agoYou 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] ) ) )- AndrewDavies4374 years ago
Helper I
Thank you so much. I tried it, very quickly it was working. That's perfect thank you so much again. Have a great day 🙂