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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Danny_Davis
Frequent Visitor

Sorting by month name in chronolgocial order in a slicer

I know that you can sort by month name (January, February, March...) in chronological order on a chart using the month numbers, but how can you do this in a slicer? I've done it before using Month & Year combinations, but now I only want the months. 

 

By default the slicer does not recognize it as a date and puts them in alphabetic order, but is there a way so that they sort the months in chronoligcal order?

 

Thanks!

-Dan

1 ACCEPTED SOLUTION
8 REPLIES 8
greggyb
Resident Rockstar
Resident Rockstar
Catalizt
Microsoft Employee
Microsoft Employee

I am super new to Power BI and I need some help applying this to a date situation.

I've got a [Created date] column that I'm adding to the X Axis of charts. The same problem exists for me as has been mentioned here: If I'm displaying months, they appear in the monthly order, but should appear yearly - then monthly.

For example November (2015), December (2015), January(2016), etc.

They currently appear: January (2016), February, November(2015), December(2015),

The values in the field relflect the month and year, but the chart seems to ignore the year.

I would love some specific instruction on how to apply the Sort by Column information. Should I be creating another column and adding order information which corresponds to the [Created Date] column?

 

Any help would be greatly appreciated. Thank you!

@Catalizt Yep, you want a YYYYMM column to sort that field on. That will straighten out your dates.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Thanks so much! I'll give it a try!

djnww
Impactful Individual
Impactful Individual

The suggestions above will definitely work.

Hi,

 

I'm experiencing a similar issue as the original post. I have a table with a column 'Month' that contains the text of the month "January","February",... and a column 'Month Number' with a number for the month 1,2,..

I need to show months is a slicer in chronogical sort but is showing alphabetically, the problem is that the slicer doesn't allows more than one field therefore the elipsis in my slicer doesn't shows the 'Month Number' column as a choice to sort by. Am I missing something?

Capture.JPG

 

J0
Regular Visitor

This link helped me with this issue:

https://blog.crossjoin.co.uk/2015/12/15/power-bi-desktop-sort-by-column-and-dax-calculations-that-us...

 

 

If you have month name columns and month number columns in your table, here's what you need to do:

- go to your data table

-select the appropriate table

-highlight the month name column

-on the menu, select the option to 'sort by column' and select the month number column. 

 

When you create a slicer using your month name column, it should be in the month number order. 

You the real MVP!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.