Forum Discussion
Parameter on Legend
Hi ZSF0003 ,
The discrepancy between the table and the stacked column chart is likely due to how Power BI aggregates data in different visual types. In a table, each row is treated individually, so the distinct count is accurate. However, in a stacked column chart, Power BI might be summing up the counts for each category, leading to an inflated total.
Measure = DISTINCTCOUNT('Table'[ID])
When you remove the date filter, the total count should not shrink if the distinct count logic is applied correctly. This might be due to how the data is being filtered or aggregated.
Measure 2 = CALCULATE(DISTINCTCOUNT('Table'[ID]), ALL('Table'[Date]))
You can create a calculated column to replace nulls with a default value.
Measure 3 = IF(ISBLANK(MAX('Table (2)'[ID])),"Unknown",MAX('Table (2)'[ID]))
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This didn't seem to solve the issue. I think there is a misunderstanding as to how stacked column chart totals are supposed to work. I'm curious if anyone else has noticed this. I tried the ALL calc, and the total label still appears to be a sum of the distinct counts rather than a distinct count itself. That's not the only oddity, but it is a frustrating issue.