Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowHi,
In my report, I've several Stacked Column Chart such as:
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:
User | Quantity |
Bill | 6 |
Ben | 8 |
Mike | 2 |
Bill | 4 |
Bill | 5 |
Mike | 9 |
Ben | 7 |
Dan | 3 |
Bill | 5 |
Dan | 8 |
Mike | 7 |
Ben | 1 |
Dan | 2 |
Bill | 6 |
Dan | 3 |
Dan | 5 |
Ben | 8 |
Ben | 6 |
Mike | 3 |
Dan | 5 |
Bill | 7 |
Dan | 4 |
Ben | 6 |
Mike | 9 |
Bill | 8 |
Dan | 2 |
Dan | 1 |
Ben | 5 |
Dan | 6 |
Bill | 3 |
Bill | 9 |
Dan | 7 |
Mike | 2 |
Bill | 5 |
Dan | 8 |
Mike | 4 |
Mike | 6 |
Do someone would know how to solve it?
Fab
Solved! Go to Solution.
hi @Fab117 Solution 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 qty
Create relation with original table
then make your stacked column visual using summary table
hope that solves your issue!
hi @Fab117 Solution 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 qty
Create relation with original table
then make your stacked column visual using summary table
hope that solves your issue!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
95 | |
67 | |
66 | |
46 | |
41 |