Forum Discussion
Sorting by Legend and Measure at the same time
Hi all, I've searched high & low and unable to find a solution to this.
What I am trying to do is take the chart below, and sort it by the "Health" legend first (this is what the chart shows). Secondly I want it to sort high-to-low within each item in the legend.
As you can see, all of the blue bars are not sorted properly, but the legend is sorted in the correct order.
Hi,
PBI file here. I sorted the table first (as described above) and then created a copy of the table. I then converted the table into a clustered column chart. Apply conditional formatting on the chart.
Hope this helps.
11 Replies
- Ritaf1983Super User
Hi Anonymous
Please apply the following steps :
1. Switch on sort by values from layout:2. You have 2 sorting options in the graph
a. sort axis :b. sorting legend:
Result
The pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- AnonymousNot applicable
Hi Ritaf1983 , When I select "sort by values", it doesn't seem to do anything to the visual. I do see the multiple options of "sort by" in the options, but nothing seems to allow me to sort by "Health" first, then "Values" high-to-low.
Sorting selected:
- Ritaf1983Super User
Hi Anonymous
please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
- Ashish_MathurSuper User
Hi,
Share the download link of the PBI file.