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
Anonymous
Not applicable

Sorting Bar Chart

Hey Community, 

 

I created some bar charts as visuals and the bars are automatically sorted by size (see picture below). Apparently I want to sort them in a fixed order which is Z27, Z30, Z33. How is this possible?
n_bod_1-1698746207475.png

I really appreciate your help!

 

Thanks!

 

2 REPLIES 2
ChiragGarg2512
Solution Sage
Solution Sage

@Anonymous , For these 3 just sort the x-axis values, but if there are more values like this create an ID column for this so that every ID can be associated with a Z value in ascending order and then sort by column can be used.

Uzi2019
Super User
Super User

Hi @Anonymous 
You have to do either sort by column option if you have proper sequence of sorting order. 

Uzi2019_0-1698746612723.png

 

Or you need to create new custom column lik below:

Sorting = SWITCH(TRUE(),
            Table[Campaign Type]="Z27", "1.Z27",
            Table[Campaign Type]="Z30","2.Z23",
            Table[Campaign Type]="Z33","3.Z33"
            
            )
Use above column in X axis
Or 
You ca simply change the setting:
Uzi2019_1-1698746899301.png

 

 

If my post helps please give kudos and accept it as a solution!
Thanks

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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