Forum Discussion

jochendecraene's avatar
3 years ago

DAX switch and sorting

Hi

 

I use a sitch function to calculate categories. Now, when presenting the data in a matrix, the categories are nog properly sorting (column "Switch"). I solved this by adding a letter in front of the categories (Switch B"). 

 

Is there a better way to solve this?

 

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    jochendecraene Yes, try adding a Sort By column. This generally works best in Power Query. You create the new column with the desired alphanumeric sorting data and then set this column to be the Sort By column of the original column.

    • jochendecraene's avatar
      jochendecraene
      Icon for Helper V rankHelper V

      I've created a new column, but where/how can I set the sorting based on that new column, since the new column is not a part of my matrix?