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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.