Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi everyone,
I'm encountering an issue with the sorting order of months in a Power BI chart. I'm using the following formula to display the month and year on the X-axis:
```
MonthYear = FORMAT('AGENT_SUBHOUR_V'[IXN_SUBHOUR_DATE], "MMM-YYYY")
```
The chart displays the months in this order:
* Sep-2023
* Oct-2023
* Nov-2023
* May-2023
* Jun-2023
* Jul-2023
* Jan-2024
However, I'd like the months to be sorted chronologically (Jan-Dec).
I've attached screenshots of the chart and the current sorting behavior for reference.
**Can anyone advise on how to ensure the months are sorted correctly based on their actual date value (chronological order)?**
Any insights or suggestions would be greatly appreciated!
Solved! Go to Solution.
Hi, @manoj_0911
Have you tried @jgeddes 's suggestion, in Column tools you can use Sort by column to sort the x-axis, the most efficient way to do this is to add an index column to the table.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, @manoj_0911
Have you tried @jgeddes 's suggestion, in Column tools you can use Sort by column to sort the x-axis, the most efficient way to do this is to add an index column to the table.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
In the 'Column tools' ribbon there is a 'Sort by column' button that you can use to assign a new column to sort the existing column by. This only works if there is a distinct value in the new column.
Depending on your data it may be better to create a date dimension table with all of the columns you need and then relate it back to your data table.
Proud to be a Super User! | |
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
89 | |
87 | |
77 | |
69 | |
68 |
User | Count |
---|---|
222 | |
128 | |
117 | |
82 | |
77 |