Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ICW1972
Regular Visitor

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?

 

Sort1.pngSort2.png

 

 

2 ACCEPTED SOLUTIONS
Idrissshatila
Super User
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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

ICW1972
Regular Visitor

Solution is here:

https://community.fabric.microsoft.com/t5/Desktop/Name-of-Month-in-Slicer-is-not-in-right-order/td-p...

You have to click on the table column and select a different sort column.  Very confusing for me personally.

View solution in original post

5 REPLIES 5
ICW1972
Regular Visitor

Solution is here:

https://community.fabric.microsoft.com/t5/Desktop/Name-of-Month-in-Slicer-is-not-in-right-order/td-p...

You have to click on the table column and select a different sort column.  Very confusing for me personally.

Idrissshatila
Super User
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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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!

@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.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Whether I sort by a distinct number or your suggestion is immaterial.  The SortOrder should be observed now without changing anything and it isn't.

I tried a simple case of manually creating a table with a few rows and it still cannot sort by the SortOrder column even if it's hardcoded (1, 2, 3, 4).  It's one of those things in Power BI that ought to be straightforward.


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.