Forum Discussion
schoden
4 years agoPost Partisan
Sort Legend Dynamically By its Value
Hi Community, Is it possible to sort the legend dynamically by the value in its column( highest to lowest) There is hardcoded way which is not I am after or alphabetically sorting. Sort e...
TheoC
4 years agoCommunity Champion
schoden ,I found this. Using the logic behind it, if the number of colors is fixed (I.e. 3 each month), you could create unique measures to total the count of a category by rank, then allocate ta colour to the rank... the rank (I.e. 1, 2 or 3) is used to sort the chart (apologies for typos, on phone) https://community.powerbi.com/t5/Desktop/How-do-I-color-the-stacked-bar-chart-by-Dax-query-according-to/td-p/1018392