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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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

16 REPLIES 16
theov
Advocate II
Advocate II

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.

Other than it should say Go to the Data View tab, works like a charm. Thanks

Other than it should say Go to the Data View tab, works like a charm. Thanks

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.