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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.