Forum Discussion

llongjr's avatar
llongjr
Regular Visitor
2 years ago
Solved

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"

 

 

 

 

  • 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.

4 Replies

  • Anonymous's avatar
    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:

    Click this visual and setup according to the screenshot below:

    And the final output is as below:


    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.

  • 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.

  • llongjr's avatar
    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.