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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
spathak04
Helper II
Helper II

Sort Legends

Hello,
I have this shape Map visual with color saturation based on category that I have created via calculated column. (Please see the image below).
But my legends which is my category are not in order or sorted in Descending/Ascending order. 
I want the order like 100% or more, 75-100%, 50-75%, 25-50%, less than 25%.

Map Legends Sorting.PNG

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

to provide a defined order to column values you have to create an additional column "sort column" that just contains a simple integer value. You have to make sure that for example for each value of "100% and more" the value in the new column equals 1 ...

 

This is described in this article:

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Hopefully, this is what you are looking for.

 

If the article doesn't help to solve your requirement, please provide a pbix file with sample data, upload the file to onedrive or dropbox and share the link.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

6 REPLIES 6
TomMartens
Super User
Super User

Hey,

 

to provide a defined order to column values you have to create an additional column "sort column" that just contains a simple integer value. You have to make sure that for example for each value of "100% and more" the value in the new column equals 1 ...

 

This is described in this article:

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

 

Hopefully, this is what you are looking for.

 

If the article doesn't help to solve your requirement, please provide a pbix file with sample data, upload the file to onedrive or dropbox and share the link.

 

Regards,

Tom 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thank you so much for quick reply. I tried using creating sort order column but I dont see any sorting option from three dots on top right corner of Map visual.(Please see the image below)
No sort option On map.PNG

 

Hey,

 

the sort order column is applied in the data model and described in the article, please read the article. 

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thanks for the help. I got one error initially(Please see image 1). But I know the solution for that. I create one column using query editor. It solved the issue. 
sort order issue created column.PNGsolved legends issue.PNG
Thank you for your help again.

Perfect!



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hey,

 

please excuse, I just realized that the document has been changed - I'm sorry about that.

 

Please search for this section in the document;

Sort using the Sort by Column button

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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