'Sorting order in legend in power bi

I tried subburst chart

And drag year field and enable legend also from properties, but this shows that legend is not in order whereas year field is already sorted in data. I checked it through dragging field in drop down

Now how i sort that legend

Check image

image



Solution 1:[1]

  1. Click the three dots on the top right of your visual.
  2. Select Sort By
  3. Select your column name (Year)

However, It seems you are using a custom visual and not the normal Pie/donut chart. So there is not anything you can do about it. The data shown here are ordered by the value returned for each item in the legend.

Best you can do is to use native charts visual of custom visual.

Solution 2:[2]

Have you got the Year column as number format? Column in the correct format

If you don't, PowerBi will not know how to order.

Then you have to sort descending or ascending as you prefer and sort by year sort by year and ascending

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Noelia Sancho Mendez