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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Not applicable

How to show legends by rank in ribbon chart



I have created a ribbon chart that shows ranks of each brand over the years (years on X-axis). However, the legends (brand names) are seen in alphabatical order. I would like to see the legend in the order of rank just like it is seen in the ribbon chart. So, for example, ribbon chart shows brand "X" with Rank 1 on top, then brand "H" with Rank 2, and so on and brand "A" with rank 10. Therfore, the legend should show brand "X" on top, brand "H" next, and so on and brand "A" as last in its list. Currently, it shows brand "A", brand "B", .... brand "Z" in alphabatical order.


Can someone please help to achieve this where legend is also seen in the order of ranking? 


Thanks for your help!



New Member

did you ever find a solution?

Not applicable


Thanks for the reply. Because this is a ribbon chart, I don't even see the option of sorting on three dots on the top corner of the ribbon chart. Also, for a better understanding of what I am looking, I have a screnshot below that shows legend in alphabatical order and I would like to see it in the rank of brands instead as seen by the ribbon chart.


Thank you!

Super User
Super User

@Anonymous , You can create a sort column and sort on that. But if rank is a column that not possible.

You can take Rank on visual and sort on that.


If rank is column

brand = [brand]

brand sort = rankx(all(table), [value])


Sort brand on the brand sort


Not applicable

I do have ranking as a measure. Can I sort legend by this mesure.

@AnonymousI'm afraid it is not supported to sort the legend by a measure. Additionlly, it seems there are two year values on X-axis and the rank of brands in each year is different. Which year's rank of brands should be applied to the legend?

Not applicable

Thanks for the reply. We are looking at the latest yerar's rank. For example, in the image above, the two years are 2017 and 2020. The last one is 2020 and we want to see the rank on 2020

having similar question.

Helpful resources

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors