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
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
- PhotoBiker8 years ago
Advocate I
Hey Anonymous,
OMG, you just saved my day :) I'm not sure if it's actually funny or embarrassing...
I created a measure, but my data model is fairly complex and there's quite a number of tables that are not related to each other. When I created my measure, I picked the client from an intellisense suggestion - but I chose an unrelated table, that's why the counts were always the same.
Thank you very much for double checking my code, and for confirming that it actually works! Based on that I reviewed my actual code and spotted the error.
Much appreciated!
- Anonymous8 years agoNot applicable
Awesome, glad to hear it! I like to create a Measures Table where all of my measures are attached. They can get chaotic pretty quick
- Anonymous6 years agoNot applicable
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.
Measure = calculate(DISTINCTCOUNT('tABLE A'[Employee Name]; FILTER('Table B';'Table B (2)'[Country]="Germany" && Table B (2)'[Country]="France.- Error: Too many arguments passed to DISTINCTCOUNT function.Maximum argument count for the function is 1.
Can anyone help define the write function?Thank you in advance.
- Anonymous3 years agoNot applicable
Hi
Can someone highlight the error in my syntax please?Stage_2_submitted = calculate(
DISTINCTCOUNT('Weekly Report Template'[Application Stage])
,FILTER('Weekly Report Template',[Application Stage]="23 Retention Payment - Application Closed"))