March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello everyone, I have the followin stacket column chart, and I woukd like to sort the the percent values and is not working by the ordinary way. I only have the option below., and if the I choose market share asc or desc nothing happens, there's a way to put the the the larger number at the end and grow the stacked till the lowest? In the image is working cause a I put some space/tab into the name of legend.
The measure is
Solved! Go to Solution.
I don't know an easier way other than what you've tried to do with the legend.
You can however, do the same thing without it visibly affecting the legend.
I do something similar to control complex table sorting requirements with this...
SortUnderHours =
//UNICHAR(8203) is a zero width space REPT() repeats a character x many times.
//More spaces sort at the top when in DESC order.
VAR __HR = [HoursRemaining]
VAR __DCE = [DaysToCycleEnd]
VAR __HRCD = [HoursRemaining_CycleDays]
VAR _c = 8203
RETURN
SWITCH
(TRUE()
, __HR <= 0, BLANK()
, AND(__DCE = 0, __HR > 0), REPT( UNICHAR(_c) , 3)
, __HRCD > 12, REPT( UNICHAR(_c) , 5)
, __HRCD >= 8, REPT( UNICHAR(_c) , 4)
, __HRCD < 8, REPT( UNICHAR(_c) , 2)
, BLANK()
)
You could adapt this for your legend potentially to control the sorting. It'll take some work which I don't have time for right now but hopefully it'll get you started.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
Hi, Can u please explain in detail how it got resolved.
Hi @Anonymous ,
It is not supported to sort a stacked column chart by value in Power BI currently .There is an idea about this issue, please vote it up, Stacked bar chart total sort , to improve the Power BI.
I have also found a similar post, please refer to it to see if it helps you.
Stacked column chart: Sort legend by value, not alphabet
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I don't know an easier way other than what you've tried to do with the legend.
You can however, do the same thing without it visibly affecting the legend.
I do something similar to control complex table sorting requirements with this...
SortUnderHours =
//UNICHAR(8203) is a zero width space REPT() repeats a character x many times.
//More spaces sort at the top when in DESC order.
VAR __HR = [HoursRemaining]
VAR __DCE = [DaysToCycleEnd]
VAR __HRCD = [HoursRemaining_CycleDays]
VAR _c = 8203
RETURN
SWITCH
(TRUE()
, __HR <= 0, BLANK()
, AND(__DCE = 0, __HR > 0), REPT( UNICHAR(_c) , 3)
, __HRCD > 12, REPT( UNICHAR(_c) , 5)
, __HRCD >= 8, REPT( UNICHAR(_c) , 4)
, __HRCD < 8, REPT( UNICHAR(_c) , 2)
, BLANK()
)
You could adapt this for your legend potentially to control the sorting. It'll take some work which I don't have time for right now but hopefully it'll get you started.
Have I solved your problem? Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;). |
If you found this post helpful, please give Kudos. It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen. If you find my signature vaguely amusing, please give Kudos. | Proud to be a Super User! |
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
143 | |
97 | |
79 | |
68 |