Forum Discussion
stacked graph order
- 9 years ago
Hi swong,
Currently, it is not supported to sort the chart based on legend. Someone has submitted this feature request, you can clisk to vote it up. Custom order for legend in stacked bar chart
As a workaround, you could create Measures for each segment. Then place each Measure in the Values area in the order you need. However, this workaround might not apply to the scenario where you have many legend items.
Regards,
Yuliana Gu
Hi swong,
Currently, it is not supported to sort the chart based on legend. Someone has submitted this feature request, you can clisk to vote it up. Custom order for legend in stacked bar chart
As a workaround, you could create Measures for each segment. Then place each Measure in the Values area in the order you need. However, this workaround might not apply to the scenario where you have many legend items.
Regards,
Yuliana Gu
The proposed workaround of using measures for sorting is not acceptable for my organization's purposes. By using measures in place of a single Legend column, we lose the ability to filter or drill from the individual bar segments.
UPDATE: I found a solution that worked for me. In involves setting the "Sort By Column" property on the column itself, either in the embedded Power BI model or in SSAS. For more info, see here: https://stackoverflow.com/questions/51156029/how-to-sort-a-bar-chart-in-microsoft-power-bi-desktop