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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
agusti_oliveres
Frequent Visitor

How to sort a date-type slicer in descending order

Hi,

I have a normal slicer with a date-type field, with month granularity. By default, the months are sorted by ascending order (from the older months at the top to the current ones at the bottom), but I would like to sort it in descending order. I have not been able to figure out how to do it. Can anyone help me with that?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Is it simply the months you want in reverse order?  For example you are showing a slicer with December, November etc?

 

If thats the case, you will need a date table and a sort column.

 

If you have a date table already, GREAT!  If not you will need to make one, which is fairly easy.

 

Once you have that, you should have a column with the Month Name and the Month Number.  This Month Name will be the column for your slicer.

 

Next you need a calculated column called "Month Sort" and its formula will be to take the month number and make 12 = 1, 11 = 2 etc.  We can do that with math by doing:

Month Sort = 13 - [Month Number]

Lastly, select your Month Name column and in the ribbon under "Modelling" select 'Sort By Column' and choose your Month Sort.

View solution in original post

7 REPLIES 7
nazirstaples
Regular Visitor

  1. Click on the Slicer, then click on three dots below (i.e. More Options)
  2. Press "Sort Descending", and Sort by "Month."

nazirstaples_0-1744302019599.jpeg

 

can you do by year and month descending ? 

 

Anonymous
Not applicable

Is it simply the months you want in reverse order?  For example you are showing a slicer with December, November etc?

 

If thats the case, you will need a date table and a sort column.

 

If you have a date table already, GREAT!  If not you will need to make one, which is fairly easy.

 

Once you have that, you should have a column with the Month Name and the Month Number.  This Month Name will be the column for your slicer.

 

Next you need a calculated column called "Month Sort" and its formula will be to take the month number and make 12 = 1, 11 = 2 etc.  We can do that with math by doing:

Month Sort = 13 - [Month Number]

Lastly, select your Month Name column and in the ribbon under "Modelling" select 'Sort By Column' and choose your Month Sort.

Hi i got your logic see now i got here a question lets suppose there are two years 2022/12/31 and 2023/2/25 now will this logic wont help.can you provide me an alternate solution

I tried to do this with date using a calculated column like this.

SortOrderDateDesc = - DATEDIFF('DateDim'[date_natural].[Date], date(9999, 12, 31), DAY)

 

But when I try to sort the slicer on the date_natural column, I get error:

"Sort by another column. This column can't be sorted that is already sorted, directly or indirectly, by this column".

 

Any suggestions?

I tried to do this with date using a calculated column like this.

SortOrderDateDesc = - DATEDIFF('DateDim'[date_natural].[Date], date(9999, 12, 31), DAY) 

 

But when I try to sort the slicer on the date_natural column, I get error:

"Sort by another column. This column can't be sorted that is already sorted, directly or indirectly, by this column".

 

Any suggestions?

I tried to do this with date using a calculated column like this.

SortOrderDateDesc = - DATEDIFF('DateDim'[date_natural].[Date], date(9999, 12, 31), DAY) 

 

But when I try to sort the slicer on the date_natural column, I get error:

"Sort by another column. This column can't be sorted that is already sorted, directly or indirectly, by this column".

 

Any suggestions?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.