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
Anonymous
Not applicable

Date Slicer Sorting

Hello All,

   Good Morning. I am having an issue of sorting the dates in my slicers. Please refer the below screenshot for understanding what kind of sorting is needed for me.

 

I wrote a conditional statement to sort, but it returned a different result which I don't want.

 

Sample file:

slicer sample pbix

 

My requirement is,

1. Months should be in Chronological order

2. Years should be in Ascending order (say 2009, 2010, 2011, 2012 and so on...)

 

1.JPG

 

How can I get the output? Please give me your suggestions and it is much appreciated.

 

Many thanks,

Praveen.

1 ACCEPTED SOLUTION
affan
Solution Sage
Solution Sage

Hi @Anonymous

 

You can add a calculated column in your date dimensions table as below.

 

YearMonthNum = Time_Dimension[Date].[Year]*100 +  Time_Dimension[Date].[MonthNo]

 

Then you can go to Modeling and sort the FiscalMonth Year on this new column.sort by fiscalyearnum.png

 

 

If this helped you, please mark this post as an accepted solution and like to give KUDOS .

 

Regards,

Affan

View solution in original post

3 REPLIES 3
affan
Solution Sage
Solution Sage

Hi @Anonymous

 

You can add a calculated column in your date dimensions table as below.

 

YearMonthNum = Time_Dimension[Date].[Year]*100 +  Time_Dimension[Date].[MonthNo]

 

Then you can go to Modeling and sort the FiscalMonth Year on this new column.sort by fiscalyearnum.png

 

 

If this helped you, please mark this post as an accepted solution and like to give KUDOS .

 

Regards,

Affan

Anonymous
Not applicable

Fantastic!!! Thank you very much for your timely help. KUDOS.

themistoklis
Community Champion
Community Champion

@Anonymous

 

This link will probably help you

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.