Forum Discussion

rihard505's avatar
rihard505
Frequent Visitor
4 years ago
Solved

Order Stacked bar chart by y-axis

It seems like it is possible to order bar charts when they have positive values, but not possible when they have negative ones - they just keep the original sorting regardless of method used.   1) ...
  • rihard505's avatar
    4 years ago

    There are other creative ways than use the 'Sort' option on the object, which work when the values are positive, but not - when negative.

     

    Anonymous, maybe I didn't explain well enough, but I want to sort the variables inside the stacked bar chart. Regardless, thanks for the effort.

    In stacked bar chart, when the values are positive are sorted like: 1 -> 2 -> 3 from 0 value, 

    for negative values they are sorted in opposite direction - also 1 -> 2 -> 3 from 0 value, but 3 -> 2 ->1 as an example is required.

     

    I found a work-around using SQL - something like this - if the values are positive then 1 to the start of the variable name is given, if, they are negative, then 3 given. Doing all of that just for the sake of custom sorting.

    Some statements like this and more:

    There could be a way, but currently I see it as limitation in Power Bi. Would be glad if I am wrong.