Forum Discussion
Manually sort 100% stack bar chart
Hi,
I would need to sort my 100% stack bar chart so that the category below "LTA25" comes on top of the list.
My target order is: LTA25, 26-34, 35-44, 45-54, 55-64, 65+.
Would really appreciate your help or ideas!
Thank you, everyone! All these solutions would work fine. However, I missed to mention that I have a direct query and limited possibility to sort, but I have got help to find a workaround that worked in the report mode.
I put age in the tooptip and set it to min, and it did the trick.
4 Replies
- AnonymousNot applicable
For a custom sort order, go to Power Query > Add Conditional Column. Populate the pop-up menu selecting the column where your range values are similarly like this:
Then, Close & Apply. Go to the Data View. Select the Range Values column, look for the Sort By Column Option in the top menu and select Sort By Sorting_Column.
That will do it. Just ensure that your visual is sorted by the range values column.
- AnonymousNot applicable
Hi Alisea_MI
You can add a column to sort your category . In Query Editor , add a conditional column like this :
Then in desktop view , add a 100% stack bar chart visual , in Axis ,add category and custom column .Sort by Custom and column 1 , in ascending order .
The final result is as shown :
I have attached my pbix file ,you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Alisea_MIResolver II
Thank you, everyone! All these solutions would work fine. However, I missed to mention that I have a direct query and limited possibility to sort, but I have got help to find a workaround that worked in the report mode.
I put age in the tooptip and set it to min, and it did the trick.