Forum Discussion

DN200's avatar
DN200
Regular Visitor
1 year ago
Solved

Adding Legend Removes Data Labels

Hello,   I'd like to display data labels on a stacked bar chart. It works fine without a legend:   But when I add a legend to this chart the data labels disapper on the smaller bars: ...
  • burakkaragoz's avatar
    1 year ago

    Hi DN200 ,

     

    This is a great observation, and you’re definitely not alone—adding a legend in Power BI stacked bar/column charts can sometimes cause data labels to disappear, especially on smaller bars. It’s not just a sizing issue; it’s actually due to how Power BI manages label rendering priority when multiple series (legend values) are present.

    When you add a legend, Power BI tries to avoid overlapping labels and prioritizes which ones to show, often skipping smaller segments to keep the chart readable. But as you noticed, when you drill down (and the number of visible legend categories drops), the labels reappear—even if there are more bars in total.

    A few things you can try:

    • Increase the font size or reduce the number of legend categories to see if more labels appear.
    • If possible, use “Data label density” (if available in the Format pane) to control how many labels are displayed.
    • Consider switching to a clustered bar/column chart if your scenario allows, as these sometimes handle labels differently.
    • As a workaround, you can also add a tooltip or custom visual to display the values on hover for the smaller bars.

    Honestly, this does feel like a rendering limitation or minor bug in how Power BI handles data labels with legends. You’re not doing anything wrong, and many users have run into similar behavior.

    If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
    translation and formatting supported by AI