Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
When using vertical stacked bar chart and put the legend "center right" or "center left", this does not give the same order as for the elements of the graph. It's even the reverse order and it's therefore particularly troublesome for reading (see screenshot).
I would like to keep the bars as is but reverse the order of the legend only to have a "graphical/natural" corresponding order between legend and chart element.
Legend Order is currently :
1) Bottom Values
2) Top Values
but I would like to have
1) Top Values
2) Bottom Values
Keeping the bottom values bottom in the stack and top values a the top of the stack
Regards,
Hi and thanks for these elements.
Unfortunalty this doesn't work, I try on a test report and the sort order of the reference table doesn't have any influence on chart.
The order of printing category in the stack is ever alphabetical (when sing categories). The only way to change is to change the name of the categories.
In a more larger study, In the case of "manual" stacking (pulling some value on Axe Y, we ever have the representation of vertical legend not in adequation with the chart, the first category (bottom of chart) is the "last" category (top of the legend) :
Stacked data | Current Legend | Expected Legend
4 | 1 | 4
3 | 2 | 3
2 | 3 | 2
1 | 4 | 1
You should use the Legend in your visual from the new table and sort the column in the new table using sort order. It should work.
Can you share sample .pbix after hiding sensitive data?
Here is an example pbix :
As we can see below, the legends are in reverse order of stacked bar chart
- top left : order ascending based on reference table
- top right : order descending based on reference table
- bottom left : order asending based on reference table (but changing libelle from top to atop to change alphabetical order)
- bottom left : order desending based on reference table (but changing libelle from top to atop to change alphabetical order)
Hi @ftuser ,
Does turning on the Y-axis invert range like this meet your requirements?
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
Hi, it's work on certains context.
But
- with this option the x_axes is on top of the graph and this is not always desirable.
- my example was a little bit oversimplified and the need also understand graphs with several value on x-axes. And the draw of vertical-bar are from top to bottom is too confusing for users.
Thanks for yours ideas,
Regards,
Hi @ftuser ,
Yes, this only works in special cases. 😥
Maybe all we can do now is vote for the idea and let the product team add this feature as soon as possible.
Best Regards,
Gao
Please re-check the url you provided for pbix.
I am unable to download file.
The URL was truncated by the "forum". I have replaced it with a shorter one
Please try with these one : https://we.tl/t-RVNnanuxEb
Hello @ftuser ,
I dont think we can acheive it. There is already Power BI Idea posted for same.
https://ideas.powerbi.com/ideas/idea/?ideaid=6b6f5485-3c57-4584-96dc-42be252595eb
Hello @ftuser ,
Create a Table with two columns like below. But make sure that name of the column is as it is in your data.
Sort your Value column as per order using sort by column option shown below-
Give relationship of this table to your data table on Value column and Legend column in your data.
And pull Value column from your newly created table in legend in place of column you were using from your data table.
Please mark it as answer if it resolves your issue. Kudos are also appreciated.
Cheers,
Shishir
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
83 | |
71 | |
49 |
User | Count |
---|---|
143 | |
120 | |
110 | |
59 | |
57 |