cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Gerri
Frequent Visitor

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
v-jayw-msft
Community Support
Community Support

Hi @Gerri ,

 

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

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

8 REPLIES 8
v-jayw-msft
Community Support
Community Support

Hi @Gerri ,

 

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

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Sorted! Thanks for your help!

Gerri_0-1655426624819.png

 

mohammedadnant
Impactful Individual
Impactful Individual

Hi @Gerri 

 

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

Hi @mohammedadnant ,

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

Gerri_1-1655167535440.png

 

 

Hi @Gerri 

 

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

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

 

Gerri
Frequent Visitor

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 @Gerri 

 

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors