Forum Discussion
Syndicate_Admin
4 years agoAdministrator
DAX DISTINCTCOUNT FUNCTION
Good evening, I'm starting to use Power BI and would like your help in the following please: I want to know the number of different codes but per request. I used a formula but it results in t...
slakshmip07
4 years agoFrequent Visitor
Hi,
If you want 5 in your card visual, you will have to use the below DAX:
Measure= COUNT(BD_OUT[CODE])
Using DISTINCTCOUNT will give you 4 as it counts the distinct values only, i.e, 92091,92092,92237, and 92238.
If you want to see it as a 2 and 3 split, you will have to use a table visual and use the same measure.
Below is what you will get,
Hope this helps,
Lakshmi
- Syndicate_Admin4 years agoAdministrator
Hello Lakshmi, good afternoon
I have a problem using that formula, for example, in this order using the measure "Count" results in 8 items, but it is actually 7 since 1 is repeated. in this case how would you fix the formula?
Thanks for the help
Best regards