Forum Discussion

losbrincos2's avatar
losbrincos2
Regular Visitor
8 months ago
Solved

Incorrect Total in Power BI Bar Chart When Using Legend

Hello, Good morning, I have a problem in Power BI that I can’t manage to solve. In a matrix with coordination data and a calculated measure, the value is correct. Both the individual values and the...
  • v-sshirivolu's avatar
    v-sshirivolu
    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.