Forum Discussion

GraceC's avatar
GraceC
Icon for Helper I rankHelper I
8 years ago
Solved

How do I custom sort my stacked bar chart?

Hi guys

 

I have a stacked bar graph in Power Bi that currently stacks alphabetically. I'm wanting to change the order that the data is stacked to a order that makes sense to me but is not alphabetical or even by size... is there some way to do this?

 

Thanks for your help!

 

Grace

  • Hi GraceC

     

    You will need to make use of the "Sort by Column" feature of the data model.  In essence, you will need another column that has values sorted in your preferred order for your main column. 

     

3 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi GraceC

     

    You will need to make use of the "Sort by Column" feature of the data model.  In essence, you will need another column that has values sorted in your preferred order for your main column. 

     

  • apihut's avatar
    apihut
    Frequent Visitor

    Is there a way to custom sort the stacked bar chart? Not alphabetically and not by size. Sort by other column is also alpha or numerical.

    In Excel Pivot Tables one can reorder items in a field manually - dragg-and-dropp with the mouse.

    I should be able to assign the colour I need to a certain item and drag it to change the position in the stacked bar chart.

    • apihut's avatar
      apihut
      Frequent Visitor

      I found a way to custom sort. It's by creating a group in the Legend. Prefix the groups names with a number to your liking.

      Then in the pop-up window add items to groups.