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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
d1x0nl30ng
Frequent Visitor

Sorting visual by year month (months with overlapping years)

i'm just trying out some simple visual with some recent data

I have data for Nov 2017, Dec 2017 & Jan2018

but when it display in chart, the sorting is messed up ( on the axis, i have removed the year & quarter levels) so it shows the data by month, but sorting is messed as it took Jan data 1st

 

monthsorting.JPG

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Dear d1x0nl30ng,

 

You should use another column with Number, it's the best way for sorting Date.

Right click on your Table, choose "New column", type a name, ex "Month Key" = FORMAT ( YourColumnDate, "YYYYMM" ) 

Then sort by Month Key.

 

Regards,

ManNVSM.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Dear d1x0nl30ng,

 

 Please try Sort By.

Go to Data > Modeling > choose your column, click "Sort by" and choose another data can sort Acs, Des.

For exam: i have a column WEEK, it's sort by ABC, i will change it Sort by "Number of Week".

Sort_By.PNG

 

Regards,

ManNVSM.

see below screenshot, i need to group my data by months, there isnt any other meaningful column i can sort with existing data.

Do i need to create another column (i.e. for nov2017 - 1, dec2017 - 2, jan2018 -3 , then sort ascending 1,2,3 ) ??

 

month sorting 2.JPG

 

Anonymous
Not applicable

Dear d1x0nl30ng,

 

You should use another column with Number, it's the best way for sorting Date.

Right click on your Table, choose "New column", type a name, ex "Month Key" = FORMAT ( YourColumnDate, "YYYYMM" ) 

Then sort by Month Key.

 

Regards,

ManNVSM.

Thanks

Anonymous
Not applicable

Nice to help you 🙂

GilbertQ
Super User
Super User

Hi @d1x0nl30ng

 

What you would need to do, is to put in a sort by column, which will then enable you to sort your dates correctly.

 

The best practise would be to actually create a date table and then leverage the dates in the date table. This would then also allow you to leverage all the DAX time intelligence functions.

 

Here is an example on how to achieve this: https://www.fourmoo.com/2016/09/13/power-bi-how-to-easily-create-dynamic-date-tabledimension-with-fi...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors