Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Alisea_MI
Resolver II
Resolver II

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+.

 

2.jpg

Would really appreciate your help or ideas!

1 ACCEPTED SOLUTION
Alisea_MI
Resolver II
Resolver 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.

Screenshot 2021-06-07 151810.jpg 

View solution in original post

4 REPLIES 4
Alisea_MI
Resolver II
Resolver 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.

Screenshot 2021-06-07 151810.jpg 

Anonymous
Not applicable

Hi @Alisea_MI 

You can add a column to sort your category . In Query Editor , add a conditional column like this :

Ailsa-msft_0-1623051895767.png

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 .

Ailsa-msft_1-1623051895769.png

The final result is as shown :

Ailsa-msft_2-1623051895772.png

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.

Anonymous
Not 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:

Raymundo2910_0-1622815097546.png

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.

Raymundo2910_1-1622815204858.png

That will do it. Just ensure that your visual is sorted by the range values column

Fowmy
Super User
Super User

@Alisea_MI 

Go to the table where you have the Category field and add a sort column then sort the Category column based on that using "Sort By Column":

Fowmy_0-1622815104639.png

 




Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.