cancel
Showing results for 
Search instead for 
Did you mean: 
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

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
ManNVSM
Resolver II
Resolver II

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

 

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

Thanks

Nice to help you 🙂

GilbertQ
Super User II
Super User II

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

secondImage

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.