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 a stacked bar chart

I have searched the forums here already for a solution for my question, but the way my data is set up doesn't seem to work for how my data is set up!

 

My data is looking at a series of projects, and tracking how many days was spent in each stage. Here's an example of how it is set up:

 

Project numberProject ManagerDays spent planningDays spent producingDays awaiting approval
1Bob2164
2Bob4248
3Jane12123
4Mary23010
5Jane6101
6Mary142

 

My stacked bar chart bars are the average time spent in each of the three stages, per project manager 

possiblepossum_0-1664252156217.png

My issue is that I want to be able to sort the bars by the stages in order (planning, then producing, then awaiting approval), but my only clear options are to sort by total days spent, or to sort the stages in alphabetical order. Is there a way I can sort the columns in my data in a custom way to change the order of the bars (I'd like to see planning at the bottom, producing in the middle, and awaiting delivery at the top)

 

2 ACCEPTED SOLUTIONS
johncolley
Solution Sage
Solution Sage

Hi @Anonymous ,

 

If you are using the columns from your table like my image below you can simply rearrange them in the Visualisation pane to change the order they appear in the graph.

johncolley_0-1664259440066.png

 

If not can you please provide more information on how your visual is built

 

If this answer solves your problem please mark it as a solution!

View solution in original post

HoangHugo
Solution Specialist
Solution Specialist

Hi, I think that chagge order of field in Y axis

Capture 13.PNGCapture 14.PNG

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thanks - this has worked! An interesting quirk though. I tried to do this method on my esxisting visual, but as I had already chosen a "sort axis" option, I couldn't unselect it and use the stacking of the fields to change the order - It had to remain checked as something.

possiblepossum_0-1664407875686.png

 

I created a new column chart visual and checked, there is no default sort selected, so I am able to adjust the order with the fields directly. Interesting quirk, or am I missing something?

 

possiblepossum_1-1664407976593.png

 

 

Hi @Anonymous , This is sorting the order in which columns appear left-to-right on the x-axis. Whereas the solutions provided are dealing with the order of items from top-to-bottom on the y-axis. Having something ticked or not ticked in the Sort Axis will not affect your ability to change the order of items within each column. 

HoangHugo
Solution Specialist
Solution Specialist

Hi, I think that chagge order of field in Y axis

Capture 13.PNGCapture 14.PNG

johncolley
Solution Sage
Solution Sage

Hi @Anonymous ,

 

If you are using the columns from your table like my image below you can simply rearrange them in the Visualisation pane to change the order they appear in the graph.

johncolley_0-1664259440066.png

 

If not can you please provide more information on how your visual is built

 

If this answer solves your problem please mark it as a solution!

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.