Forum Discussion
How to sort stacked column chart in Power BI desktop?
- 8 years ago
Hi Let,
The sort "The longest bar first" is available if the x-axis is type of Text.
How can I make it work even with numbers (for consistency) ? (Besides, if x-axis is the type of Text, the chart has an horizontal scrollbar)
To make the sort option work with numbers, you can just set X-Axis Type to "Categorical". However, with this option, all labels will be shown on the X-Axis, so an horizontal scrollbar will be shown up if the chart is not big enough. :smileyhappy:
Regards
Where can I find the option to sort by "Longest Bar First"?
Oh, there it is. I'm posting a picture here to help the next lost Dashboarder. It'll be in the top right of your visualization.
- cjdw_PU8 years agoRegular Visitor
Hi comish, I don't think this preserved the sort order of the x-axis. Choosing that "Sort by Count of Change Type" makes the x-axis resorted by the x-axis values with highest bar (regardless of individual color size within a bar) to the lowest.
Hi Let,
In my stack bar,
Axis: text. Shown in ascending order. I am okay with this
Legend: text.
Value: Count of the column in legend.
I am still trying to figure out: while preserving the sort order of the x-axis (Data type: text, sorted ascending), how to sort longest bar first within each x-axis bar? Longest bar to shortest bar is determined by Value.
Any help is appreciated.
- LeviCaers8 years agoFrequent Visitor
Hi,
I'm experiencing the same problem I've searched for the option longest bar first but I cannot find it.
My X-axis is of type text and the values are a count of type whole number.
Any suggestions.
Cheers- bartbouwman6 years agoFrequent Visitor
Hey,
You already find a solution for this problem? I am facing the samen problem at the moment..
- ZAS3 years agoNew Member
Thank you so much - it's not easy to find! Worked a charm for me.