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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
crwinchester
Helper I
Helper I

Super Stupid: How do you sort Visual Legend by Value?

I see there a number of questions about this, but the answers are disturbingly complex - Where is the button that I click to have a legend sort by value? I've already sorted all the underlying data in the correct order, but the visuaI is not sorting this correctly. What am I missing? 

 

Sorting is incorrect.Sorting is incorrect.

8 REPLIES 8
kpost
Super User
Super User

Alternative solution I just got working, based loosely on this approach:
https://www.seerinteractive.com/insights/reorder-powerbi-legend

I created a new table using :

sort_table = generateseries(1,1000,1)

I then made a relationship between that column and the [group] column.


then I added this column to the same table where the [group] column is located:

custom sort = RELATED(Sort_table[Value])


Then I selected the [group] column and used the "Sort by Column" option under "Column Tools" and selected [custom sort].

Thanks for this response. I followed these instructions and there was no effect. I created a new table by entering data. I then established the cardinality, created a column with the related function, and finally told the visual to sort the data by that column. PowerBI still disobeys the sorting logic. I think there may be a glitch. Sorting the data with inherint sorting qualities should sort automatically OOTB. Unless there is another method I'm missing? 

What is the name of the visual you are using?  It doesn't appear to be behaving the way the ones that come standard with the desktop software do...  I'll download it and see if I can get it to work.

There seem to be a number of visuals with this problem. It still feels like PowerBI is the foundational issue: Inherint sorting via the loaded data should be a standard option.

@kpost , were you able to try the AsterPlot visual I mentioned above? I stil haven't found a way to get it to obey any sorting rules. It still seems broken. Thanks.

kpost
Super User
Super User

help.png->three dots in the top right

-> Sort axis
-> Group

-> Sort Ascending

Right. So, what if the "Sort axis" option doesn't exist from the menu that appears when you click the ellipsis of the visual object?PowerBI_Legend Sorting_00.png

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.