Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AgoZ_KH
Resolver I
Resolver I

Truble with column chart sorting

Hi to all power BI users!!

I'm in truble with an apparently semply issue. My scenario is like the same:

 

Suppose you have a table like this:

                   Comp1    Comp2    Comp3    Comp4

Milan14,213,1713,1913,17
Rome14,813,1113,1213,1

each column is an average value

 

I try to generate an histogram like this:

 

example.png

 

 

My intention is to sort data by the average value. But when I select the descending order by average the sorting remain costantly the same by the legend alfabetically sort.

Has anyone suggestion for resoleve my issue??
Tanks in advance
Ago

 
4 REPLIES 4
AgoZ_KH
Resolver I
Resolver I

Thanks for the very quickly answers Tara_ & abhie.

 

I understand the design of sorting by legend in a clustered chart -an fundamentaly I agree whith this.

 

Thinking of resolve my matter using a different view for the chart; i.e. using drill-down expanded hierachy. Not so clear as the first chart choiche but good as work around ...

 

Ago

Anonymous
Not applicable

If your cities are limited then why not create separate bar chart for each city. then sorting on average will work
Tara_
Helper II
Helper II

Hi @AgoZ_KH ,

 

This cannot be done directly using this visual, when you sort by value it'll sort by the total value of each cluster and not the individual bars.

These people had a similar issue and was suggested to create a Rank Column and then sorting by Rank

https://community.powerbi.com/t5/Desktop/Clustered-Bar-Chart-Sorting/m-p/729143

https://community.powerbi.com/t5/Desktop/Sorting-legend-by-value-in-clustered-bar-chart/td-p/538619

 

Hope this helps

Anonymous
Not applicable

Ranking will only give you control on the order of the legend, but it will still not change the order within each city.

 

Basically the design of the charts are such that the legend remains in the same order for each category of the axis, either automatically selected by alphabetical order which is happening in your case, or when you create dummy measures for each category and then place them in a desired order. 

In both case it will maintain the order.

 

You may like to submit the idea or vote existing ones here https://ideas.powerbi.com/forums/265200-power-bi-ideas?query=sort%20legend

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.