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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Martin_Machovec
New Member

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

Martin_Machovec_1-1752656471826.png

 

Martin_Machovec_0-1752656453608.png

 

1 ACCEPTED SOLUTION

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.:

 

dmp_0-1752707370498.png

 

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.:

 

dmp_1-1752707450460.png

 

The chart is now sorted in ascending order of year as required, e.g.:

 

dmp_2-1752707486022.png

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

4 REPLIES 4
lbendlin
Super User
Super 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-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

This is required solution: 

Martin_Machovec_0-1752668714838.png

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. 

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.:

 

dmp_0-1752707370498.png

 

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.:

 

dmp_1-1752707450460.png

 

The chart is now sorted in ascending order of year as required, e.g.:

 

dmp_2-1752707486022.png

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Dear Dm-P, 

thank you for your reply, I tried to replicate your solution and it works as well. Thank you for your advice and time invested to reply to my problem and teaching me new stuff.
Best regards

M.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors