cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Sort by legend on stacked bar chart

I've looked at numerous posts on here and other sites, but their charts seem a load more complicated than mine.

I can't even believe that this is a problem, I'm sure there must be something insanely simple that I am just missing!

 

I have a very simple stacked bar chart made up of just three items:

 

Axis is Account Period (think of this as months)

Legend is Status

Value is Actual Premium

 

Capture.JPG

 

All I want to do is change the order of the Legend, but I cannot find an option anywhere to do this. Now I know that Power BI likes to leave blindingly obvious feautures that every other BI suite on this planet has built in by default, but surely there is a simple tick box or something somewhere that I am just being a fool and missing?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Post Patron
Post Patron

You can change the sort individually for a legend. However Power BI will pick up the sorting logic defined for the column in the data model. The default is alphbetical. To change it

1. you would need another sort column in your table  i.e"sorting logic" (1,2,3...) 

2. then set the sort setting for your column to sort  by the column "sorting logic"

 

This will change the sort order for the column across the data model, hence also be applied to the legend.

More details here:https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column#:~:text=Power%20BI%2....

 

Another quick fix: What you could do is change the value to add numbers that will change the sort. Example "1. Secured" "2. Potential"

View solution in original post

Highlighted

I found this video on YouTube that really simplified the steps needed.

 

https://www.youtube.com/watch?v=4xapOrfLvbg

 

Thanks once again for your reply, put me on the right track.

 

 

View solution in original post

3 REPLIES 3
Highlighted
Post Patron
Post Patron

You can change the sort individually for a legend. However Power BI will pick up the sorting logic defined for the column in the data model. The default is alphbetical. To change it

1. you would need another sort column in your table  i.e"sorting logic" (1,2,3...) 

2. then set the sort setting for your column to sort  by the column "sorting logic"

 

This will change the sort order for the column across the data model, hence also be applied to the legend.

More details here:https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column#:~:text=Power%20BI%2....

 

Another quick fix: What you could do is change the value to add numbers that will change the sort. Example "1. Secured" "2. Potential"

View solution in original post

Highlighted

Thanks @mahimabedi I had hoped that there would be a simple gui based option, but I'm finding that with Power BI a lot of really simple stuff seems to need work arounds to make it work.

 

Using your advice and piecing together other articles I've worked it out.

Highlighted

I found this video on YouTube that really simplified the steps needed.

 

https://www.youtube.com/watch?v=4xapOrfLvbg

 

Thanks once again for your reply, put me on the right track.

 

 

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors