Forum Discussion
Distinct Filter not giving the result expected
- 2 years ago
I think you can achieve your goal with the 'Visual Calculations'.
Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn
I don't know your detailed data, so I'll explain with a simple data example.
In the table below, if you run "DISTINCTCOUNT" on just "BM", the result will be "4".
Also, if you run "DISTINCTCOUNT" on just "CM", the result will be "3", and the sum of these is "7" (=4+3).
But if you run "DISTINCTCOUNT" on "BM&CM", the result will be "6". This is because there is duplicate "Assetnum" data, as marked in yellow in the table.
Hi mickey64
That makes sense, but how can I acheive 7, as I need the output of 7 for my case.
appreciate your help
Thanks,
Chiru
- mickey642 years ago
Super User
I think you can achieve your goal with the 'Visual Calculations'.
Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn
- lbendlin2 years ago
Super User
You need to materialize the individual calculations via SUMMARIZE or SUMMARIZECOLUMNS if you want the DISTINCTCOUNT by category rather than across categories.