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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Months in chronological order in slicer

I have created one table for dates using MIN(DATE) & MAX(DATE) from existing table, then I have added column for Month and Year.

Now I have used Month in Slicer, but months are not showing in chronological order.

 

Any suggestion?

Help would be highly appreciated.

 

 

 

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download example PBIX file

 

I might need more information to understand this properly.

So you've created a Date table using the MIN and MAX dates in your data?  Then added columns for Month and Year? 

Is the Month column text e.g. the name of the month or some abbreviation like Jan, Feb etc?

If so then you need to also create a month number column and use that as the Sort By column for any text month column.

In my example PBIX (linked to above) I have columns for Date, Month Name and Month Number.

sort1.png

Click on the Month Name column and then from the Ribbon click on Sort By column and select Month Number.

sortby.png

The slicer should now be sorted chronologically.

sort2.png

Regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Download example PBIX file

 

I might need more information to understand this properly.

So you've created a Date table using the MIN and MAX dates in your data?  Then added columns for Month and Year? 

Is the Month column text e.g. the name of the month or some abbreviation like Jan, Feb etc?

If so then you need to also create a month number column and use that as the Sort By column for any text month column.

In my example PBIX (linked to above) I have columns for Date, Month Name and Month Number.

sort1.png

Click on the Month Name column and then from the Ribbon click on Sort By column and select Month Number.

sortby.png

The slicer should now be sorted chronologically.

sort2.png

Regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Thank you very much @PhilipTreacy  -Phil

 

Initially I was getting an error while doing the same. later I created new Calendar Table, this time I gave static date range from 01-01-2017 to Till Date instead of getting from my existing table and sorted the column on Month Number and it worked.

 

 

 

Portrek
Resolver III
Resolver III

Hi rameshg.


You need to create a custon colum in your calendar table with the number of the month. Use the code below.


"Month number", FORMAT([Date], "MM")

 

After that, you have to sort the column month by the number month.

 

Best regards.

Anonymous
Not applicable

Thanks a lot @Portrek for your reply. 

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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