Forum Discussion

Varshi288's avatar
Varshi288
Resolver II
1 year ago
Solved

Hierarchal sorting

Hi All,

 

I have some difficulties in sorting based on two columns, Region and Sales region in a slicer. In a table view I can do this. I can sort based on Region. But need to sort based two columns. Need inputs. thanks in advance.

Current Sort.

 

  • I did add the sort number sales region and tried to sort in the table view.I got the below error.

     

     

     

5 Replies

  • It worked after creating a new table Sales Region Sort.

     

    Thanks

    • v-hashadapu's avatar
      v-hashadapu
      Community Support

      Hi Varshi288 , We are happy to hear that you have found the cause and resolved the issue. Thanks for sharing the details here.  Please mark your insights 'Accept as solution' to help others with similar problems find it easily. 
      Thank you.

  • Deku's avatar
    Deku
    Super User

    You can add a extra column that you define interger that represent the custom sort order of a to sort each column

     

    You can can a calculated column like this

     

    Switch(

    Table[country],

    "north Europe", 1

    "Central Europe", 2

    ...

    )

     

    The Docs describe how to apply the new sorting column

    • Varshi288's avatar
      Varshi288
      Resolver II

      I did add the sort number sales region and tried to sort in the table view.I got the below error.

       

       

       

      • Deku's avatar
        Deku
        Super User

        A single region should not be represented by multiple numbers and a different number should be used per each region