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
LyndonTomas
Frequent Visitor

How to order the stacks in a stacked bar chart?

For context, I have a Power Bi report connecting to a Share Point list. For this one, I have a stacked bar chart containing the Status of each department. In my list, there are 2 columns "Status" and "Department". How can I order the stacks ina specific order based on this sequence, group by "Completed", "In-Progress", "Not Started", "On-Hold", "Cancelled".

Here is the bar chart for reference.

LyndonTomas_0-1682668051633.png

 

2 ACCEPTED SOLUTIONS
eliasayyy
Memorable Member
Memorable Member

create a new column in your table called order

order = SWITCH( 
               TRUE(),
               "Completed",1,
               "In-Progress",2,
               "Not Started",3,
               "On-Hold",4,
               "Cancelled",5
)
                       

 

after that, press on the column where you have the status and in the toolbar you will find "Sort Columb by",

press it and choose the "order" column

now go to your stacked report and sort by status ascending

View solution in original post

ValtteriN
Super User
Super User

Hi,

The legend sorting can be changed by chanhing the sort order of the column in your table. E.g.

Data:

ValtteriN_0-1682672058573.png

No sort:
(A to D)

ValtteriN_1-1682672095947.png

 

Sort by column2:
(D to A)

ValtteriN_2-1682672134049.png

ValtteriN_3-1682672149158.png

So in your case you can create a new column with values for department statuses (e.g. numbers 1 to 5) and use that for sorting.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




View solution in original post

2 REPLIES 2
ValtteriN
Super User
Super User

Hi,

The legend sorting can be changed by chanhing the sort order of the column in your table. E.g.

Data:

ValtteriN_0-1682672058573.png

No sort:
(A to D)

ValtteriN_1-1682672095947.png

 

Sort by column2:
(D to A)

ValtteriN_2-1682672134049.png

ValtteriN_3-1682672149158.png

So in your case you can create a new column with values for department statuses (e.g. numbers 1 to 5) and use that for sorting.

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




eliasayyy
Memorable Member
Memorable Member

create a new column in your table called order

order = SWITCH( 
               TRUE(),
               "Completed",1,
               "In-Progress",2,
               "Not Started",3,
               "On-Hold",4,
               "Cancelled",5
)
                       

 

after that, press on the column where you have the status and in the toolbar you will find "Sort Columb by",

press it and choose the "order" column

now go to your stacked report and sort by status ascending

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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