Forum Discussion
Distinct count not returning a result
Hello
I have the following formula, but not able to return any results.
- Anonymous5 years ago
Hi Anonymous
I think Don't know in your table may not equal to the string in measure, so the measure couldn't find it.
You could try to copy Don't know from table and try again.
And here I will give you some advice.
If your table is like the following table I built, you can use 100% Stacked bar chart and count(distinct ) function in this visual.
My Table:
Or you can update your measure:
Measure = CALCULATE(DISTINCTCOUNT('Table'[Respid]),FILTER('Table','Table'[What sort of job?]=MAX('Table'[What sort of job?])))Result:
You can download the pbix file from this link: Distinct count not returning a result
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
11 Replies
- AnonymousNot applicable
Hi Anonymous ,
Can you share some sample data and expected output?
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)- AnonymousNot applicable
Hi Anonymous ,
If I follow your measure, this is what I get.
Let me know if you are looking for something like this, else please share sample data and expected output.
Don't Know = CALCULATE(DISTINCTCOUNT('Table'[respid]),FILTER('Table', 'Table'[What sort of job?]="Don't know"))DCOUNT = DISTINCTCOUNT('Table'[respid])Measure = DIVIDE([Don't Know],[DCOUNT])Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)- AnonymousNot applicable
The formulas all work, but for some reason, nothing comes through in the visualisation...hoping it's not something i've unchecked or filtered out, but here's the output...'don't know' is in the chart, but not displaying...
- amitchandakSuper User
Anonymous , formula seems correct
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- AnonymousNot applicable
Hi Anonymous
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
- AnonymousNot applicable
Hi Rico
Yes, sorry, it has been solved, by another user. Sorry, I have been on leave so haven't been able to access my messages as frequently.
Thanks
- AnonymousNot applicable
Hi Anonymous
Could you kindly share your workaround or accept the helpful reply as the solution?
More people will benefit from it.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Sorry, I got confused with a different post, but this one has been solved with the above solution.
Thanks