Forum Discussion
Graf Y axis data sorting
Got this graf but I want to switch the order of years on y axis from oldest beeing on the top to the lates on the bottom, so far i tried variaty of different aproches including adding new culumn and table with sorting indexes, unfortunetly, none of these worked. Very simple stuff in excell in Power Bi total nightmare. Consulted with Copilot and chat GPT, tried variety of different aproches with no luck. Is it even possible? Thank you for any advice
It can already be done in the core product. If you're using a numeric field, ensure that your axis field is set to Categorical rather than Continuous (which is the default for numeric columns), e.g.:
This will ensure that the visual has a discrete entry on the scale for each unique value. Then, you can sort your field as usual, e.g.:
The chart is now sorted in ascending order of year as required, e.g.:
Regards,
Daniel
4 Replies
- lbendlinSuper User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- Martin_MachovecRegular Visitor
This is required solution:
How ever somethink that is done with excel in a second takes unfortunetlly very long in Power BI and you need to use python for that, because of all the limitations that are provided with Power Bi. So not a issue for me anymore and this matter can be closed. But to MS developers if you are reeding this, come on... wake up this stuff is not so hard to implement.
- dm-pSuper User
It can already be done in the core product. If you're using a numeric field, ensure that your axis field is set to Categorical rather than Continuous (which is the default for numeric columns), e.g.:
This will ensure that the visual has a discrete entry on the scale for each unique value. Then, you can sort your field as usual, e.g.:
The chart is now sorted in ascending order of year as required, e.g.:
Regards,
Daniel