The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.