Forum Discussion
Card visualizer count distinct without blank
- Anonymous6 years ago
Hi Haya,
Please try to create one measure as below:
Measure = CALCULATE(DISTINCTCOUNT('Table'[Name]),NOT(ISBLANK('Table'[Name]))&&TRIM('Table'[Name])<>"")
Best Regards
Rena
The information you have provided is not making the problem clear to me. Can you please explain with an example. If possible please share a sample pbix file after removing sensitive information.
Thanks.
My Recent Blog -
Time Intelligence - Direct Query
| Name | ID |
| Sara | 1 |
| Haya | 2 |
| Hana | 3 |
| Haya | 1 |
| Hana | 3 |
When I use "card" visualizer, count distinct Name, the output become 4 because it calculates the empty cell (blank). the output should be 3.
- amitchandak6 years agoSuper User
Try
calculate(distinctcount(Table[Name]),not(isblank(Table[Name])))Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin- Haya6 years agoHelper II
I've tried but the same
- amitchandak6 years agoSuper User
- apentyala6 years agoHelper II
I believe amitchandak formula will work to ignore to blank values. I don't know why is not working for you.
try
= CALCULATE(DISTINCTCOUNT(Table1[Name]),FILTER(Table1,NOT(ISBLANK(Sheet1[Name]))))