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
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
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.