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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
llongjr
Regular Visitor

Stacked bar chart sorting

Hi;

I need assistance sorting a stacked bar chart by total values, like in the first image below. It sorts by total values. I couldn't manage to do the same. It adds total values as an extra. I'm a super beginner in PowerBI and could not resolve it by searching. Thanks in advance. Here is the pbix file : "https://1drv.ms/u/s!Avvx84c9QDZKjVbP5m0KbqjIf0UH?e=t4UNPd"

 

 

llongjr_0-1713281925331.png

llongjr_1-1713282630608.png

 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, perform the following steps

  1. Remove the total and rank columns
  2. Select the first column, right click and select "Unpivot Other Columns"

Now create your visual.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
llongjr
Regular Visitor

Hi @Ashish_Mathur,

 

Thank you, your solution is super helpful.

 

Hi @Anonymous

 

In my case, the Y axis type selection is not visible. It might be because of the data type, as it is text. Thanks for the support.

 

Best Regards.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, perform the following steps

  1. Remove the total and rank columns
  2. Select the first column, right click and select "Unpivot Other Columns"

Now create your visual.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @llongjr ,

I can't open files from OneDrive for some security reasons, but I can create my own sample data to fix the problem for you.
Here is my sample data:

vjunyantmsft_0-1713316246675.pngvjunyantmsft_1-1713316254987.png

Click this visual and setup according to the screenshot below:

vjunyantmsft_2-1713316318683.pngvjunyantmsft_3-1713316358064.png

And the final output is as below:

vjunyantmsft_4-1713316379660.png


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.