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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GraceC
Helper I
Helper I

How do I custom sort my stacked bar chart?

Hi guys

 

I have a stacked bar graph in Power Bi that currently stacks alphabetically. I'm wanting to change the order that the data is stacked to a order that makes sense to me but is not alphabetical or even by size... is there some way to do this?

 

Thanks for your help!

 

Grace

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @GraceC

 

You will need to make use of the "Sort by Column" feature of the data model.  In essence, you will need another column that has values sorted in your preferred order for your main column. 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
apihut
Frequent Visitor

Is there a way to custom sort the stacked bar chart? Not alphabetically and not by size. Sort by other column is also alpha or numerical.

In Excel Pivot Tables one can reorder items in a field manually - dragg-and-dropp with the mouse.

I should be able to assign the colour I need to a certain item and drag it to change the position in the stacked bar chart.

apihut
Frequent Visitor

I found a way to custom sort. It's by creating a group in the Legend. Prefix the groups names with a number to your liking.

apihut_0-1623969962770.png

Then in the pop-up window add items to groups.

apihut_1-1623970160641.png

 

Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @GraceC

 

You will need to make use of the "Sort by Column" feature of the data model.  In essence, you will need another column that has values sorted in your preferred order for your main column. 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors