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
PowerBisfun
Regular Visitor

Power BI not sorting months properly

Hi everyone. 


I've created a very basic dataset to sort out expenses. The issue is, Power BI sorts the months correctly, but not by year. See image attached

 

How can I fix this? How can I get it to display Nov 2018, Dec 2018, etc.? In the correct order

Example for PowerBI.PNG

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey,

 

in a way it does, there are two options just create a yearmonth column that contains values that can be ordered, like so: 201811, 201812, 201901 or 2018-11, 2018-12, 2019-01

 

A second option is that you use nested columns on the x-axis.

To create a nested hierarchy, just add the columns like Year and Month to the x-axis of your chart:

image.png

 

Make sure the "Concatenate labels" property is set to off (Formatting pane --> X axis card):

image.png

 

Drill down all levels of the hierarchy in your chart:

image.png

 

Sort the x axis accordingly, please be aware that this might look different as your column names are different :-)):

image.png

 

A final move might be that you have to change the order sequence from descending to ascending or vice versa

 

Hopefully this is providing some ideas.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

1 REPLY 1
TomMartens
Super User
Super User

Hey,

 

in a way it does, there are two options just create a yearmonth column that contains values that can be ordered, like so: 201811, 201812, 201901 or 2018-11, 2018-12, 2019-01

 

A second option is that you use nested columns on the x-axis.

To create a nested hierarchy, just add the columns like Year and Month to the x-axis of your chart:

image.png

 

Make sure the "Concatenate labels" property is set to off (Formatting pane --> X axis card):

image.png

 

Drill down all levels of the hierarchy in your chart:

image.png

 

Sort the x axis accordingly, please be aware that this might look different as your column names are different :-)):

image.png

 

A final move might be that you have to change the order sequence from descending to ascending or vice versa

 

Hopefully this is providing some ideas.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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.