Sum of distinct count

Hi, I’m new to QuickSight. I’m trying count distinct ID’s but combining different companies into categories and using it as a filter. When I’m doing this the totals of the ID’s are wrong

Can anyone provide any tips / guidance?

Thank You,

You could try distincCountOVer which allows you to pre-filter and pre-aggregate the data as well as partition it. I haven’t used it but the syntax looks like you can group it by your categories. It’s worth a try anyway.