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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.