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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi there,
I am desperatly trying to sort the values in a stacked bar chart by descending order. In the example below of GDP by country, I would like to have the USA values at the bottom of the chart, followed by China etc. how is this possible?
I tried using the sorting option in the settings on the top right of the chart but in only sorts the columns not the stacks.
thanks in avdance.
s
Hi @Anonymous ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Since Power BI orders the legend alphabetically, We can create a calculated column as a legend to meet your requirement:
RankLegend = RANKX ( 'Sales 2015', [CountryRegion],, DESC, DENSE ) & " " & [CountryRegion]
Please refer to the similar threads: https://community.powerbi.com/t5/Desktop/Modify-the-legend-order/td-p/25337
BTW, pbix as attached.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.