Forum Discussion
DISTINCTCOUNT with filters
- Anonymous8 years ago
Hey PhotoBiker,
I tried your code and it worked for me. I got a "Clients who Answered Yes" of 1 for all of the specific filters, and 2 if no filters were selected. Did you create a measure or a calculated column? A measure should produce the proper output while a calculated column would behave the way you are describing.
Thanks,
Parker
Hi.
I have similar situation. Scenario:
Table A:
1. Employee Name-column
Table B:
1. Country
Objective: Count distinct Employee Name by Germany and France- ONLY.
- Below is what I have done.
- Error: Too many arguments passed to DISTINCTCOUNT function.Maximum argument count for the function is 1.
Hey Anonymous
Could you try this code?
Measure =
CALCULATE(
DISTINCTCOUNT('tABLE A'[Employee Name]);
FILTER('Table B';'Table B (2)'[Country]="Germany" && 'Table B (2)'[Country]="France")
)
I added an extra ' to Table B (2) and " to France. And also some closing brackets.
- Jsummers2 years ago
Helper I
Thank you, I have just used this and it worked great 🙂