cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jessj
Frequent Visitor

Sort a legend by y axis instead of x axis

Does anyone know how I can sort the legend in the Quadrant chart visual to sort by y-axis, instead of x-axis? So that the legend show highest-lowest values of the y-axis. 

 

Thanks for your help!

7 REPLIES 7
yingyinr
Community Support
Community Support

Hi @jessj ,

You can refer the content in the following links to achieve it:

How to modify the legend order in power bi

Customize the Legend Order in Power BI - Stacked Column Chart

If the above ones are not applicable for your scenario, please provide some sample data(exclude sensitive data) and your expected result with specific examples. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jessj
Frequent Visitor

Thanks! I don't think this is what I need. I am using the quadrant chart, and the x-axis is amount of sales, the y-axis is the amount of money earned. The legend is the person the data is refering to. Right now, the legend shows the person with the most sales, and I would like it to show the person with the most money earned. Does that make more sense?

yingyinr
Community Support
Community Support

Hi @jessj ,

Please select the legend field and click Sort by column to select Y axies field just as shown in below screenshot:

yingyinr_1-1619600879630.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jessj
Frequent Visitor

Hi

jessj
Frequent Visitor

hm

jessj
Frequent Visitor

I get an error code that says:

we can't sort the (legend field) column by (y-axis field). There can't be more than one value in (y-axis feild) for the same value in (legend field). Please choose a different column for sorting or update the data in (y-axis field). 

 

Is there another way to do this, if my data has more than one value for the legend field?

yingyinr
Community Support
Community Support

Hi @jessj ,

Sorry that I didn't find a good solution. I refer the following blog to create a custom legend in the sample pbix file, please check whether that is what you want.

Want a custom LEGEND for your Power BI visual? WATCH THIS!

yingyinr_0-1619685366333.png

Best Regards

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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors
Users online (2,070)