cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Pratima
Helper III
Helper III

Month Name in sorting order

Hi All,

 

I want Month Name to displayed like in ascending or descending order not like this

2017-03-31_15h41_05.png

 

 

 

 

 

 

Thanks,

Pratima

1 ACCEPTED SOLUTION
tjd
Impactful Individual
Impactful Individual

Go to the database tab, select month name column from your calendar table.  Select the modeling tab and then "Sort by Column" and select your month number column.  Month name should now appear in the correct order.

View solution in original post

14 REPLIES 14
theov
Advocate I
Advocate I

Hi, you can sort month name by month number (sort by another column possibility). 

If you have multiple years, you should create a year month column combining year and month and sort this column. To sort the latter you need to create a new column too basically amplifying the importance of year by multiplying to like 100 and adding month number:

 

Here is a video explaining it thoroughly:

https://www.youtube.com/watch?v=Oq5WOmo94_Q

rhea3663
New Member

Hello, 

 

This works when I have 12 months of data. But in case I have 24 months of data I get the sorting order as 

 

Apr-20,Apr-21,May-20,May-21. 

 

Can you please help with sorting 24 months' data appropriately? 

tjd
Impactful Individual
Impactful Individual

Go to the database tab, select month name column from your calendar table.  Select the modeling tab and then "Sort by Column" and select your month number column.  Month name should now appear in the correct order.

My sort by column is greyed out. And I do not have a live connection either. How do I get my table to show month columns in the right order?

Anonymous
Not applicable

Perhaps you can try to reload the data table and try to restart Power BI.  I experience this too.

Anonymous
Not applicable

Thank you. Ervery time I forget this. So adding comment here so that I can refer in future. 

I have the same case it doesn't !!!

dave2ta
Regular Visitor

Awesome, thank you for that... I would have wasted a lot of time on this...

 

Dave

Thank you Tjd for the valuable answers.....

 

Now i am getting the expected result

 

 

Thanks,

Pratima

 

I am running Power BI Desktop version 2.51.4885.701 and do not have a Database tab.  I have Home, View, Modeling, and Help.  Do you mean the Modeling tab?  If not, is there a different way to sort in numerical month order, instead of alphabetical month order?

tjd
Impactful Individual
Impactful Individual

Sorry, tab is probably the wrong term, view would be more appropriate.  Within PowerBI Desktop, you have 3 icons on the left.  The top one is the visualization view, next is the data/database view, and the third is the relationship view.  Click on the data/database view and then follow the above instructions.  

I have the same problem but the way I get my data into Power BI is with a live connection to Microsoft Analysis server. So I don't have a database view. How do I do it?

I have the same problem, i'm using a live connection to a Analysis Service. So i don't see the three tabs on the left.

Anyone got a solution for this?

Anonymous
Not applicable

If you are using live connection from Analysis Services. 
you can do it in your analysis services model. click on the month name field and goto properties there you can see sort by column option click on the drop down and select month num column( if you don't have one already create one by using Calendar function). Process the cube and you can see changes in Power BI now. 

 

Hope it helps.

 

Thanks
Pranay

Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.