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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Naseem73
Regular Visitor

Sorting Months for multiple Years

Dear All,

 

Please check this problem. I want to sort multiple years and months but it's showing the wrong result.

Naseem73_0-1677070690979.png

 

I am using the FMonthnumber field for sorting the months column.

 

Naseem73_1-1677070790913.png

 

 

4 REPLIES 4
Naseem73
Regular Visitor

still waiting reply

MAwwad
Solution Sage
Solution Sage

It looks like the issue is with the sorting of the "Months" column, which is not sorting the months in chronological order. You can fix this by creating a custom sorting order based on the month name.

Here are the steps to create a custom sorting order:

  1. Go to the "Data" tab in Excel and select the column that contains the month names.
  2. Click on the "Sort & Filter" button and select "Custom Sort" from the dropdown menu.
  3. In the "Sort" dialog box, click on the "Add Level" button to add a new level of sorting.
  4. In the "Sort by" dropdown, select the column that contains the year.
  5. In the "Sort On" dropdown, select "Values".
  6. In the "Order" dropdown, select "Oldest to Newest".
  7. Click on the "Add Level" button again to add another level of sorting.
  8. In the "Sort by" dropdown, select the column that contains the month names.
  9. In the "Sort On" dropdown, select "Custom List".
  10. Click on the "Custom List" button and enter the months in the order that you want them to be sorted (e.g., January, February, March, etc.).
  11. Click "OK" to close the "Custom Lists" dialog box and then click "OK" again to close the "Sort" dialog box.

By following these steps, you should be able to sort the months column in chronological order within each year.

Dear Sir,

Thank you for your reply.

I don't have data in the excel sheet. 

Snap which I share is Power BI data.

I am very new to Power BI, If I missing any point in your message please let me know.

Check table snap of date table 

Naseem73_0-1677128675271.png

 

Have you tried to create an Index an sort that column based on the index ?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors