on 6/16/2021 5:38:17 PM
Thanks for the feedback. Vote to keep updated on progress for this item.
Bump. This is desperately needed.
The related suggestion for correcting the default sort order needs more votes, for those who are interested: https://ideas.powerbi.com/ideas/idea/?ideaid=b1363cc1-0810-462d-8801-0e64973751c7
The legend should be in the same order as the stacked bar charts as default. No one wants them in opposite order, it is confusing for the reader and therefore bad practice. Why was it programmed this way in the first place?
I always use this trick (or almost something like this)
Had always worked correct for me
It will be great to have this feature indeed.
As a workaround I use the custom conditional columns.
You insert a new conditional column in the data table (I called it order by)
Assign a number for each value in the desired column(column A) for which you want to assign the custom order. If you have 10 values you want to put in specific order you use the number from 1 to 10.
Make sure your new column is with data type Number. Then close & apply the changes,
Select the column (Column A) to which you want to apply custom order,
Once you select the (Column A) on the top new tab Column tools will appear
Select sort by and select the new column with the assigned number for the values in your column
It works well for me as a workaround to sort and order everything the way I want to. The downside is that it is manually maintained.
Hope that helps,
How is simple functionality like this not yet a feature in Power BI? I keep running into imo pretty basic things that are simply not possible. Please add this ASAP!
I agree with @Lisa Rea
There are two issues here. The "easiest" issue to solve should be matching the legend to the segmented bar colors. As Lisa points out, when you move the legend to the left or the right, the legend is now the OPPOSITE of the color order. How did the dev's at Microsoft not notice this?
This issue gets confused with "sorting the category order". There are plenty of workarounds for this using a "sort column". It would be nice to have a feature where you didn't have to resort to a workaround, but at least this is possible. You can custom sort all day, but the legend will still be backwards.
The issue of the legend order not matching the segment order does not have a solution yet.
As for the comment of "This can be done via Sort by Column already" that isn't the whole issue when it comes to stacked charts. Even with the column sort defined the legend order will not match the chart when you place the legend on either the left or right side. In these cases the legend order is the oposite of the stack order. For example, the bottom-most stack will be the top item in the legend list. So the issue, as I see it, is two-fold. First, allow an order that is manually defined and different from the default sort order for the column. Second, when placing the legend on either the left or right side the order of the legend should match the order of the stacks REGARDLESS of the defined sort order of the stacks themselves. Every tool I have used (Excel, Tableua, BO, etc.) has the legend order matching the stacks when the legend is positioned on the left or right
This can be done via Sort by Column already
Need to be able to sort Legend by Value not just alphabetically