Forum Discussion
Mr_Glister
Advocate II
2 years agoDAX distinct count with filter condition
I have an issue with something that I thought would be easy. Below is a sample of my data. I would want to create a DAX measure that counts the number of companies (distinct!) that have >= 10 It...
- Anonymous2 years ago
Hi Mr_Glister ,
I made simple samples and you can check the results below:
Total Count = var _t = ADDCOLUMNS('Table',"total",SUMX(FILTER(ALL('Table'),[Week]=EARLIER([Week])&&[Company]=EARLIER([Company])),[Item sold])) RETURN CALCULATE(DISTINCTCOUNT([Company]),FILTER(_t,[Total]>=10))An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
sayaliredij
Solution Sage
2 years agoHI Mr_Glister
Can you try following DAX instead?
Count above 10 = CALCULATE( DISTINCTCOUNT( Table1[Company]), FILTER( ALL(Table1), SUM( Table1[Items sold]) >= 10))and let me know if it works
Thanks,
sayali