Forum Discussion
Distinct Count with filter
- Anonymous5 years ago
Hi Anonymous ,
I have test with your measure, it works on my side:
It's suggested to first check your dataset by applying simple filter like "TOTAL MILES is 3000" as HashamNiaz said.
If it does not make sense,please share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
I have test with your measure, it works on my side:
It's suggested to first check your dataset by applying simple filter like "TOTAL MILES is 3000" as HashamNiaz said.
If it does not make sense,please share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Eyelyn, I am doing this but mine is counting all the raws, including the blank ones. am I missing something?
it should be 16 instead of 24.
- Anonymous5 years agoNot applicable
Hi Anonymous ,
According to the screenshot,It seemed that you got the error count in Excel not in Power BI.
Please try :
- In Excel:
- In Power BI:
Measure = CALCULATE(DISTINCTCOUNT('Table'[Driver1 ID]),FILTER('Table','Table'[Total MILES]>3000))Refer to:
https://stackoverflow.com/questions/1119614/return-empty-cell-from-formula-in-excel
https://exceljet.net/formula/count-cells-that-are-not-blank
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.