Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
When creating a stacked column chart with a legend I get the following result:
As you can see, the legend sorts from top to bottom (1 to 5) and the stacked column sorts from top to bottom (5 to 1).
I think analyzing the stacked column if the legend was sorted from 5 to 1 would be much easier, is there a way to do this? I want the legend positioned on the left.
Solved! Go to Solution.
Hi,
I had a quick play and couldn't find any way of changing the sort order of the legend independently of the stacked bar.
Achievable with layered visualisations though:
Can send you the .pbix if you need it?
Cheers
Mark
Hi,
I had a quick play and couldn't find any way of changing the sort order of the legend independently of the stacked bar.
Achievable with layered visualisations though:
Can send you the .pbix if you need it?
Cheers
Mark
Hi theBIbutler
Im really struggling with this particular issue. Pulling my hair out trying to get this right 🙂
I know you did this a while ago but is it possible for you to share that .pbix with me?
Hi,
You're lucky.... I still have it!
PM me your email address and I'll send it on....
Cheers
Mark
Sure, PM me your email address.
Is there anyway of attaching it in here does anyone know?
In case anyone is looking for a workaround...
Create a stacked bar chart, and put the legend where you want it. It's backwards. Ugh. Great.
Now copy/paste the visualization and convert it into a pie chart. Click the "..." and choose to sort Z-A of your legend.
Now get rid of the legend in your bar chart and turn the background on, and set the transparency to 0%.
Now for the magic: PUT THE PIE CHART BEHIND THE BAR CHART, and leave the pie chart's legend sticking out. Ta-da! You now have a stacked order that matches your legend order.
"But Shefik," you immediately say. "That's all well and good, but now the stack AND the legend are both backwards." That's where I tell you to pray to the Power BI gods and hope that they make the legend order configurable in a future monthly release. This is the best I can do for you.
Thanks for your reply!
That looks the way that i want it. I would like you to share your .pbix if possible but one thing:
If you did it by creating a measure for 1, 2, 3... then unfortunately it is not going to work in my case because the legend is going to have over 1000 different measures, depending on the filters selected.
Yeah needed a couple of additional columns. Are your 'measures' in your legend numbers? There must be some formula/easy way to reverse the order which is all you need for this?
If the legend is made up of numbers then I've managed to do that.....pm me your email address and I'll forward on the .pbix.....
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |