Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi,
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!
User | Count |
---|---|
101 | |
69 | |
58 | |
47 | |
47 |