Forum Discussion

mumbetaliyev's avatar
mumbetaliyev
Frequent Visitor
7 years ago

Sorting legend by value in clustered bar chart

I would like to sort a legend by value in a clustered bar chart. Is there any way I can do it.  So, I have regions on X-axis and value on y-axis. On X-axis, rigions consist of 6 type of taxes. When I sort the chart by value, it is sorting total tax value. I also would like to sort inside of the rigions the type of taxes by value. Is it possible? Thank you

3 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support

    Hi mumbetaliyev

    Create a rank column

    rank = RANKX(FILTER(ALL(Sheet3),[region]=EARLIER(Sheet3[region])),[value],,ASC)

    Then select the clustered bar chart, click on the "taxes" column on the right pane, then select "Sort vy column"->"Rank"

     

    Best Regards

    Maggie

    • mumbetaliyev's avatar
      mumbetaliyev
      Frequent Visitor

      Maggie, v-juanli-msftThank you for the answer When I created a rank column and sorted by rank it said that it is impposible to sort because In rank column cannot be more than one value of the same value in taxes. My data consist of 17 000 rows and have 7 levels of hierarchy.  What kind of information you need to get full understanding of the data in order to check the possible solution. Thank you

      • v-juanli-msft's avatar
        v-juanli-msft
        Icon for Community Support rankCommunity Support

        Hi mumbetaliyev

        my previous test use some specific data, it seems ok with this method, but when the data changes, it is impossible to sort the legend by another column.

        Since legend could only sort by one kind order, but waht you want is to sort each legend inside the Axis differently, i'm afraid it is impossible by design.

         

        Best Regards

        Maggie