Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello
I have a stacked bar chart with a single bar and 5 different sections (values separated by legend). Depending on the set of data I've specified, the sections in the bar reorganize themselves depending on value. How can I stop that reordering?
Thanks,
ajmonster
Hi @ajmonster,
Below is the result in my test, actually, the legend order is sorted by legend items by default. The sections in the bar don't reorganize themselves depending on values.
In your scenario, maybe the order based on value is precisely the same as order depending on legend items. If you want to customize the legend order, please see below steps:
Add a conditional column in query editor mode based on legend field.
In data view, change the default sorting.
Result.
Best regards,
Yuliana Gu
Hey @v-yulgu-msft,
If one of the sections value is negative, they will reorganize (even if you eliminate the x axis values in my case, or y axis in your case). I was hoping not to create a new column, but it seems that's the only option here.
Cheers,
ajmonster
Hi @ajmonster,
As you said, the column bar will take the negative/positive into account. It doesn't make sence to sort different sections only based on legend items, while ignore the actual values. As each section should display its value, corresponding to data point on Y-axis.
I'm afraid your requirement cannot be achieved now.
Regards,
Yuliana Gu
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 120 | |
| 95 | |
| 70 | |
| 69 | |
| 65 |