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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

change the order of the Legend

If I want to change the order of the Legend.

 

I am using a column header, WeekStatus to indicate Day 1 and Day 2.

 

When I put that in the Legend box for the clustered bar chart,

 

It shows Day 1 as the left clustered bar and Day 2 on the right. I want it in reverse order.

 

Do you know how to do this?

omg6.JPG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

So what I did was instead of keeping 'Current Week' as the primary table to be appended, I made 'Previous Week' the primary because it does this by alphabetical order.

 

This should be an easy feature to add into PowerBI but the vote count is too low to get it pushed.

 

So I figured it out. Also I had to rename my labels to

'Current Week'->'This Week'

 

Previous Week kept as the same

View solution in original post

12 REPLIES 12
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Based on my research, I am afraid you could not achieve this feature currently, you could vote for below idea:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/31937392-legend-manual-sorting

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

So what I did was instead of keeping 'Current Week' as the primary table to be appended, I made 'Previous Week' the primary because it does this by alphabetical order.

 

This should be an easy feature to add into PowerBI but the vote count is too low to get it pushed.

 

So I figured it out. Also I had to rename my labels to

'Current Week'->'This Week'

 

Previous Week kept as the same

Thanks for letting us know how you solved your issue, I am sure it will assist others.




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

Proud to be a Super User!







Power BI Blog

GilbertQ
Super User
Super User

Hi there

It appears that what you are looking for is to use the Sort By Column

Here are details on how to get this done: https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column




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

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

hmm it seems that's the idea but I cannot sort by the column header i want.

 

In my clustered bar chart I have 3 columns:

 

percentage on the y.

 

comparing different categories with Current Week and Previous Week as the Legend.

 

Current week appears on the left bar and previous week on the right. I want the opposite.

Hi there

That would probably be due to having the Current Week and Previous Week on the different axis.

What if you swap them around?




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

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

How do you swap?

Changing from the Legend and Axis fields.




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

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

That won't work. Is there another way?

I do not think so off the top of my head unless there is a custom visual.




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

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

in my clusterd bar chart: i have percentage as values comparing different categories on the axis with Week status as the Legend. week staus is a column that takes in values 'current week' or 'previous week'
in the plot,
current week appears on the left bar and previous week on the right. I want the opposite.

swapping does not work. what aboit creating a new measure?
Anonymous
Not applicable

There is a similar post in which they create a new measure, however,

 

My column: WeekStatus was created through PowerQuery...

 

These methods don't work in my case:

https://community.powerbi.com/t5/Desktop/Modify-the-legend-order/td-p/25337

 

https://community.powerbi.com/t5/Desktop/Rearrange-Pies-in-Pie-Chart/m-p/25218#U25218

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors