powerbipowerquery

Sort Text Numbers in ascending in Slicer


I am trying to sort the text based numbers in slicer, but within the slicer settings I am unable to sort the values.

enter image description here

How can I sort these values within the slicer?


Solution

  • This is not a good practice in your case, but there is a way how to sort any field in order different then it's value.

    To do this you should have one more field in the table containing field you wish to sort. In your case you should have to Start month fields:

    So suppose you have a such table:

    enter image description here

    Then you can select your text field in Data palette and change sort it's sort order using "Sort by column" menu item within "Column tools" menu:

    enter image description here

    And the result of this is that text field is sorted in order of numeric one: enter image description here