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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Fab117
Helper IV
Helper IV

Stacked Column Chart (sorted by Legend – Highest to Lower value)

Hi,

In my report, I've several Stacked Column Chart such as:

Fab117_0-1688138515338.png

 

Where "Sum Quantity" is simple measure which does the sum of the field "Quantity" from my table

 

 

Sum Quantity = SUM(ReferenceTable[Quantity])

 

 

 

My challenge is that my users are sorted by alphabetical order (from A to Z). I'd like to sort my Users by Sum Quantity. From the one with highest figure in Sum Quantity to lowest one.

I did a search with google, but the only tuto I found were to define the sorting by defining Bill as number 1, Ben as number 2, … which is not applicable for me.

As I can't attach demo file, here is a table sample:

UserQuantity
Bill6
Ben8
Mike2
Bill4
Bill5
Mike9
Ben7
Dan3
Bill5
Dan8
Mike7
Ben1
Dan2
Bill6
Dan3
Dan5
Ben8
Ben6
Mike3
Dan5
Bill7
Dan4
Ben6
Mike9
Bill8
Dan2
Dan1
Ben5
Dan6
Bill3
Bill9
Dan7
Mike2
Bill5
Dan8
Mike4
Mike6

 

Do someone would know how to solve it?

 

Fab

1 ACCEPTED SOLUTION
MohTawfik
Resolver I
Resolver I

hi @Fab117 
Solution on Right sideSolution on Right side


I did it with creating a summary table 

SummaryTable = 
SUMMARIZE(
    'Table',
    'Table'[User],
    "Total Qty", CALCULATE(SUM('Table'[Quantity]))
)

 

Create summary table then sort User with total qtyCreate summary table then sort User with total qty

 

Create relation with original tableCreate relation with original table

 

then make your stacked column visual using summary table
4.png
hope that solves your issue!

View solution in original post

3 REPLIES 3
MohTawfik
Resolver I
Resolver I

hi @Fab117 
Solution on Right sideSolution on Right side


I did it with creating a summary table 

SummaryTable = 
SUMMARIZE(
    'Table',
    'Table'[User],
    "Total Qty", CALCULATE(SUM('Table'[Quantity]))
)

 

Create summary table then sort User with total qtyCreate summary table then sort User with total qty

 

Create relation with original tableCreate relation with original table

 

then make your stacked column visual using summary table
4.png
hope that solves your issue!

Hi @MohTawfik ,

Thank you for spending time looking at my issue.

 

Have a nice week.

 

Fab

@Fab117 you welcome

same for you.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.