Forum Discussion
Incorrect Total in Power BI Bar Chart When Using Legend
- 8 months ago
HI losbrincos2 ,
A bar chart total only stays correct when both the numerator and denominator of your measure aggregate the same way across all slices. In your model, one part of the calculation (like Technicians, Gross Team Capacity, or something coming from the Coordination dimension) is likely aggregating differently at the total level than at the category level. This usually happens when there’s mixed granularity (e.g., bookings by day but capacity by month), duplicated or unmatched keys in the Coordination table, or a denominator that isn't additive (such as DISTINCTCOUNT). Once a legend is added, Power BI splits the visual into multiple filter contexts, which forces the denominator to recalculate and that’s why the total shifts only after the legend is introduced. To fix it, validate granularity, make sure the Coordination dimension has clean unique keys, and confirm that the denominator measure behaves the same at both row and total levels. Any filter sensitive part of the measure will cause the total to change whenever a legend is applied.
Power BI bar chart totals change when adding legend due to filter context differences in your measure.
FTE Effective =
VAR TimeBooked = [Time booked (excluding on-call and off-hours)]
VAR Capacity = [Gross Team Capacity] / [Technicians]
RETURN
DIVIDE(TimeBooked, Capacity, 0) + 0
Test in matrix first (should match), then bar chart. Works consistently
If this answer helped, please click Kudos or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande