Forum Discussion
How to sort date slicer by month name when already using SortOrder column
This one is an oldie but a goodie. I've not found a solution to something that seems like it should be straightforward. Lots of posts on how to do this but they are not working for me.
I have table that has some dates. It's not a Calendar table, just some dates.
I have a SortOrder column that is sorted in the table and in the visualization.
February 2024 should appear first, then January 2024, etc. The dates go back to July 2023. I always end up with the axis sorted by Month Name.
What am I doing wrong?
Hello ICW1972 ,
if you want to only sort the months in the slicer , then you click on the month column and sort by month number
Solution is here:
https://community.fabric.microsoft.com/t5/Desktop/Name-of-Month-in-Slicer-is-not-in-right-order/td-p/3152828
You have to click on the table column and select a different sort column. Very confusing for me personally.
5 Replies
- Idrissshatila
Super User
Hello ICW1972 ,
if you want to only sort the months in the slicer , then you click on the month column and sort by month number
- ICW1972Regular Visitor
Not really. If I have two July months (2023, 2024) that doesn't work. That's why there is a SortOrder column to provide distinct values.
I tried your suggestion anyway and it doesn't sort.
Thank you for replying though!- Idrissshatila
Super User
ICW1972 ,
So you need to have a year/month column as the following:
year/month = format('YourTablename'[dateColumn],"mmm YYYY")
year/month sort = format('YourTablename'[dateColumn],"mmYYYY")
and sort the year/ month column by the year/mont sort.
- ICW1972Regular Visitor
Solution is here:
https://community.fabric.microsoft.com/t5/Desktop/Name-of-Month-in-Slicer-is-not-in-right-order/td-p/3152828
You have to click on the table column and select a different sort column. Very confusing for me personally.