Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Sort legend for stacked column chart

I'm trying to sort the legend by a custom order and looked at past tutorials to create the sort table and sort index.

But when I try to sort the legend for the stacked chart, it still sorts the legend by alphabetical order.

Am I missing a step somewhere?

 

Sample data and the stacked chart:

Gerri_0-1655107977168.png

Relationships between the tables:

Gerri_1-1655108089624.png

 

Table sorted by column sort order:

Gerri_2-1655108224475.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Add the sort order column to tooltip field, then you should be able to sort the visual by that column.

 

Best Regards,

Jay

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous ,

 

Add the sort order column to tooltip field, then you should be able to sort the visual by that column.

 

Best Regards,

Jay

Anonymous
Not applicable

Sorted! Thanks for your help!

Gerri_0-1655426624819.png

 

mohammedadnant
Impactful Individual
Impactful Individual

Hi @Anonymous 

 

You need to use the feature of SORT BY COLUMN, pls see below image

mohammedadnant_0-1655117125321.png

 

 

Thanks & Regards,

Mohammed Adnan

Learn Power BI: https://www.youtube.com/c/taik18

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!

Thanks & Regards,
Mohammed Adnan
Learn Power BI: https://www.youtube.com/c/taik18
Anonymous
Not applicable

Hi @mohammedadnant ,

I did use SORT BY COLUMN but it doesn't affect the visual.

Gerri_1-1655167535440.png

 

 

Hi @Anonymous 

 

Can you try to select ascending/descending in the legend of this visual

mohammedadnant_0-1655182553682.png

 

 

Thanks & Regards,

Mohammed Adnan

Learn Power BI: https://www.youtube.com/c/taik18

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!

Thanks & Regards,
Mohammed Adnan
Learn Power BI: https://www.youtube.com/c/taik18
Anonymous
Not applicable

Hi @mohammedadnant ,

With the legend of this visual selected:

Gerri_0-1655185205900.png

With the legend of this visual not selected:

Gerri_1-1655185289183.png

The strange thing is that I have no problems with the legend if it was a pie chart..

Gerri_2-1655185520255.png

 

Anonymous
Not applicable

Hi @mohammedadnant ,

Is there any solution for the visual to sort by the custom sort order? I've tried rebuilding my visual but the legend won't sort by the custom order if it's a column chart..

Hi @Anonymous 

 

Please share the sample to test.

 

Thanks & Regards,

Mohammed Adnan

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!

Thanks & Regards,
Mohammed Adnan
Learn Power BI: https://www.youtube.com/c/taik18

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.