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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
tomwwagstaffRIT
Frequent Visitor

Sort chart x axis

Hi everyone,

 

This seems an extremely basic problem, but I can't sort a graph by its x-axis alphabetically. Here is a reproducible example:

 

Take this dummy data:

LetterNumber
A1
B2
C3

 

I use this to create a simple bar chart in Power BI desktop. I cannot sort the x-axis ascending by letter - I can have it descending, or I can sort either way by number (i.e. I can sort on the values rather than the axis variable).

 

power_bi_cant_sort.PNG

Anyone know why I'm getting this behaviour?

1 ACCEPTED SOLUTION
danextian
Super User
Super User

 Hi @tomwwagstaffRIT,

 

Based on your screenshot, Sort by Category has already been activated. Just click again on Z-A icon. It should change to A-Z once the sort order has been changed to ascending.










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

20 REPLIES 20
Anonymous
Not applicable

Hi people anyone know how i can have the x axis appearing as in the screenshot please?

Matt82_0-1640100396689.png

 

Anonymous
Not applicable

Hi @Anonymous 

> Select a column or line visual. On the X axis drag drop a date field (Data type should be "Date").  On the axis option, select "Date Hierarchy" and get rid of Quarter and Day. Also click on the drill down to "At lowest level of Data". Your visual should look something like below: 

adnanzakir_1-1640127541241.png

 

> go to "Format your visual" > X axis > and turn OFF "Concatenate Labels": 

adnanzakir_2-1640127785475.png

 

This should do the trick. 

 

Anonymous
Not applicable

Hi,

In the same column chart, is there a way to sort the columns by decreasing value? so for example, within 2016, we will see the column with the highest value left. Thanks

Anonymous
Not applicable

Hi 

 

Thank you for your help. The below is how mine is appearing. Any idea how i can get this similar to yours? I have followed the instructions you have sent but it was difficult for me to see the images clearly due to the resolution. 

 

Matt82_1-1640168421406.png

 

Anonymous
Not applicable

Hey @Anonymous 

You're almost there, the only step left is go to "Format the visual" > Go to X Axis > Go to Concatenate labels and turn it off 

adnanzakir_0-1640212845100.png

That should do the trick. 

Please accept the answer as solution if this works. Cheers. 

Anonymous
Not applicable

awesome, thanks-I was missing the conctaenate labels part 🙂

Anonymous
Not applicable

Hi,

 

Thank you so much for you help. I am almost there. The below is how mine is appearing 

 

Matt82_0-1640168315935.png

 

Anonymous
Not applicable

Hi

 

One way to solve the problem is to add a another column to the data table with ranking numbers (the way you want to sort it).

Then in the graph, add that column to the Tooltips field on the right bar. Then click on the three dots --> sort by --> choose the column --> check that it's A to Z.

 

Hope that helps 🙂

Anonymous
Not applicable

Hi ,

 

But the problem with Tooltips is it does the sort for us. But when you are pointing in the bar the tooltips appers when you hover over the values in your chart. It shouldn't happens right? how do i disable that tooltip in not showing to the end user, he don't want to know that we sorted by some xyz, when he hovers over the bar in our chart.

Anonymous
Not applicable

The key point is that you have to click on the elipsis in the upper right. Took me a while.

BRO YOU ARE A LIFE SAVER !!! YOU HELPED ME GET THIS ISSUE DONE BIG TIME

oslo3452
New Member

I am facing a similar problem but with months. I want to sort months from Jan - Dec but looks like it can only sort alphabettically (ascending or descending)

monthly report.PNG

Anonymous
Not applicable

Hello, could you solve it?

Anonymous
Not applicable

Hi Oslo. Not sure if you've got the answer to this. But did you try changing the format of the Months in the Data tab? 

By the looks of it, the months have been categorized as "text" in Data Type. Changing it to appropiate Date format should help. 

danextian
Super User
Super User

 Hi @tomwwagstaffRIT,

 

Based on your screenshot, Sort by Category has already been activated. Just click again on Z-A icon. It should change to A-Z once the sort order has been changed to ascending.










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian,

 

Well that worked! I swear I had clicked that icon repeatedly before with no effect - but it switches sort order now. Thanks for your time and attention on such a silly problem!

 

Cheers,

Tom

The same thing happened to me.  Later did I realize that I didn't click the sort I con at  all, just the category to sort the chart by.










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Glad to know it's not just me...

Thank you!!!!!!!!! Caught me out as well...

Thanks!!!!! This caught me out as well...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.