Forum Discussion

Justas4478's avatar
Justas4478
Post Prodigy
1 year ago
Solved

Stacked column chart with dynamic legend

Hi, I created this chart in excel. As you see it shows legend with the data and it is dynamic and changes with the filters. I am trying to create same chart in power bi but I cant best I done...
  • v-tejrama's avatar
    v-tejrama
    1 year ago

    Hi Justas4478 ,

     

    Thank you for the update and for trying the suggested option. The custom visual may not fully match Excel’s dynamic legend alignment because Power BI’s visuals, both native and custom, don’t replicate this feature exactly. The best way to achieve similar behaviour is by reshaping your data model using Unpivot Columns and then creating the stacked column chart as previously described. This setup allows the legend to update dynamically with filters, which addresses your main requirement. Although the result may not look exactly like Excel, it is currently the most reliable and supported method in Power BI.

    If you need a closer match, you could explore other visuals in AppSource, but the unpivot and stacked column chart remains the most consistent and flexible solution.

    Thank you,

    Tejaswi.