Forum Discussion
how to count distinct values in a column
- Anonymous9 years ago
solved with the following
CountItem = CALCULATE (
DISTINCTCOUNT (TblName[itemnumber] );TblName[Status]="Open")
6 Replies
- AnonymousNot applicable
solved with the following
CountItem = CALCULATE (
DISTINCTCOUNT (TblName[itemnumber] );TblName[Status]="Open")- MAAbdullah47
Helper V
This work with me In measure (correct value) but On column, it gives a wrong value , why ?
- gusdahu
Helper IV
Hi Anonymous ,
I used the same DAX you posted, however I received a result of one when it should've been two. What am I doing incorrectly? Here is my DAX expression:
Count Words = CALCULATE(DISTINCTCOUNT(Sheet1[Description]),Sheet1[Description]="Gloves")Regards,Gus Dahu
- Framet
Resolver II
Hi,
Without seeing some example data this isn't all that clear. If you have two possible text values in a column then distinct count will only return 0,1,2 depending on your filters. Is this your desired result?
It might seem a bit obvious but does DISTINCTCOUNT([Your Column Name] return what you need?
Thanks
Thomas- AnonymousNot applicable
Thanks. I came to this post looking for help finding the number of distinct values in a column and the DISTINCTCOUNT function did work for me.
- AnonymousNot applicable
Worked perfectly! Thank you so much!