Forum Discussion
Sorting the Slicer
- 10 years ago
sanoraya - To order your months by a number range I go to the data tab in Power BI desktop:
In the ribbon you will see the Sort By Column button. Select the column you are interested in first (in my picture it would be Months), then click the Sort By Columns button.
Now you need to have a column which lists the months in the numeric order you want. For example, January will always show up as 1. In the sort by column button you will then need to click the appropriate column containing the month numbers.
This will then sort your slicer the way you want.
Thanks,
Giles
The suggested solution is the ideal one. However, you might get caught by circular dependency errors too if it's a more complex measure rather than something simple like the static list of months as suggested.
Another workaround would be to list your options in excel (column 1), create the corresponding order in the next column and paste this as a new table into Power Bi. In the data relationships tab, create a relationship between the real field and the list of options you just created as column 1. Then use Column 1 in the slicer and order by column 2 in the same manner as the suggested solution in this thread.