Forum Discussion
Sort legend in different way
- Anonymous9 years ago
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
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.