Forum Discussion
Naseem73
3 years agoRegular 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. I am using the FMonthnumber field for sorting the months column. ...
MAwwad
3 years agoSolution 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:
- Go to the "Data" tab in Excel and select the column that contains the month names.
- Click on the "Sort & Filter" button and select "Custom Sort" from the dropdown menu.
- In the "Sort" dialog box, click on the "Add Level" button to add a new level of sorting.
- In the "Sort by" dropdown, select the column that contains the year.
- In the "Sort On" dropdown, select "Values".
- In the "Order" dropdown, select "Oldest to Newest".
- Click on the "Add Level" button again to add another level of sorting.
- In the "Sort by" dropdown, select the column that contains the month names.
- In the "Sort On" dropdown, select "Custom List".
- 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.).
- 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.
Naseem73
3 years agoRegular Visitor
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
- MAwwad3 years agoSolution Sage
Have you tried to create an Index an sort that column based on the index ?