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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
AnetaK
Helper V
Helper V

How to sort 100 % Stacked bar chart?

Hello,

 

Is there a way to sort this chart from biggest to smallest values and not in the alphabetical order?

AnetaK_0-1669713469077.png

 

4 REPLIES 4
v-yanjiang-msft
Community Support
Community Support

Hi @AnetaK ,

According to your description, here's my solution.

Create a calculated column.

Rank =
RANKX ( 'Table', 'Table'[Value],, DESC, DENSE )

Then select the Category column, in Column tools>Sort by column>Rank

vkalyjmsft_0-1669787972970.png

Get the expected result:

vkalyjmsft_1-1669788034175.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

What if I want to slice my table by additional dimensions?

Calculated column would not work then as this rank should be dynamic.

Would a RANKX measure do?

Hi @AnetaK ,

I can't reproduce how a dimension dynamically change the value, could you please give an example?

If we use the Category as a slicer, it still works.

vkalyjmsft_0-1669860192368.png

Best Regards,
Community Support Team _ kalyj

For example if we slice by month.
In each month a different category might be the biggest.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.