Forum Discussion

markmess77's avatar
markmess77
Icon for Resolver I rankResolver I
2 years ago
Solved

Stacked bar chart not sorting axis properly with parameters

I have a stacked bar chart that I am trying to sort by the value of the measure. However, by default it keeps sorting the axis alphebetically by the names of the category on the axis. I know that I can set the sort order of the visual within the "Sort axis" option in the ellispis of the visual, and that does temporarily work when I select that option. However, if I flip from one measure back to the original using the parameter selection, it reverts back to sorting the axis alphabetically. 

 

It's worth noting that it sorts correctly if I do not have a field in the legend. Only when I include a field in the legend does the sorting work incorrectly.

  • Looks like I found a workaround. So the field that I was previously using in the legend of the chart was from a dimension table. But if I joined the field directly into my fact table and used it from there, the sorting works fine. 

     

    Not sure what the technical reason is for the difference as the values are exactly the same, but at least I have the functionality that is required.

1 Reply

  • Looks like I found a workaround. So the field that I was previously using in the legend of the chart was from a dimension table. But if I joined the field directly into my fact table and used it from there, the sorting works fine. 

     

    Not sure what the technical reason is for the difference as the values are exactly the same, but at least I have the functionality that is required.