Forum Discussion

spathak04's avatar
spathak04
Helper II
7 years ago
Solved

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%.

 

  • 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 

6 Replies

  • 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 

    • spathak04's avatar
      spathak04
      Helper II

      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)

       

      • TomMartens's avatar
        TomMartens
        Super User

        Hey,

         

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

         

        Regards,

        Tom