Skip to main content

Power BI

Needs Votes

Custom order for legend

Vote (2690) Share
Krishna Sankar's profile image

Krishna Sankar on 30 Jul 2015 05:43:14

I should be able to order the "legend" and the values for each legend category in a stacked bar chart. This is similar to "series order" feature in Excel

Administrator on 20 Aug 2020 01:24:03

Thanks for the feedback. Vote to keep updated on progress for this item.

Comments (279)
Krishna Sankar's profile image Profile Picture

55a20d53 fbc2-4a3e-80c6-b6819895641c on 16 Aug 2020 03:53:59

RE: Custom order for legend

for example if i have this values in a column:
0-5,5-10,10-15,15+
and i wanted to display this value in a visual in this order.

Krishna Sankar's profile image Profile Picture

55a20d53 fbc2-4a3e-80c6-b6819895641c on 16 Aug 2020 03:53:56

RE: Custom order for legend

custom sort of strings
for example i have this ranges:
0-5,5-10,10-15,15+
and i want to display the visual in this order.

Krishna Sankar's profile image Profile Picture

1736771a 8919-4e84-a41f-34e384b7c5ba on 16 Aug 2020 03:53:52

RE: Custom order for legend

'@N1c0l3 - thanks your workaround solution did the trick - but yes agree this should be a standard feature to allow custom sorting

Krishna Sankar's profile image Profile Picture

83a33655 c61f-43c0-987a-0a1e31fddc21 on 16 Aug 2020 03:53:51

RE: Custom order for legend

This would be great for all charts!

Krishna Sankar's profile image Profile Picture

83679e83 5905-4ab2-9035-69462fc222ca on 16 Aug 2020 03:53:49

RE: Custom order for legend

Does anyone have a quick workaround for this? Custom sort is a feature that is absolutely needed.

Krishna Sankar's profile image Profile Picture

74d0466d 4305-43ec-a247-661b1fd76d5b on 16 Aug 2020 03:53:49

RE: Custom order for legend

Quick workaround: since it's sorted alphabetically, rename the data to have some number of spaces before it. "__legend1" "_legend2" "legend3" will sort as desired. Legend displayed at top of page strips preceding spaces, but the desired sort is achieved!

Krishna Sankar's profile image Profile Picture

ffe21896 0b61-4d8d-8835-b543983fb272 on 16 Aug 2020 03:53:48

RE: Custom order for legend

I tried to solve this issue by creating a table with Legend elements in a column and another column, and then ordering elements in Legend by other column, but I defined that column in terms of the Legend column (CALCULATE, ALLEXCEPT AND SUM), so Power BI refused to change the Sort (thus avoiding some sort of loop). Having this feature would definitely make it easier.

Krishna Sankar's profile image Profile Picture

b16018fe 96ca-4d3f-a6c4-10dcfb6506c8 on 16 Aug 2020 03:53:31

RE: Custom order for legend

100% agreed. Allows you to avoid having to create a date workout for custom date hierarchy structures.

Krishna Sankar's profile image Profile Picture

36e69597 3b82-45a9-92eb-fc4244d2224b on 16 Aug 2020 03:53:28

RE: Custom order for legend

This is a must.

Krishna Sankar's profile image Profile Picture

7b0a7a39 e348-4e5b-92ec-e4a2a3e47bac on 16 Aug 2020 03:53:09

RE: Custom order for legend

waterfall charts currently only sort by category. Need to have the ability to sort by the measure, as is present in column reports.