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
vivien57
Helper II
Helper II

Wrong sorting: Stacked Column Chart

Hello everyone,

I don't understand a behaviour of PowerBI.

I have a Stacked Column Chart that has a bad sort (due to a many to many relationship)

Picture1.png

You can see in several places that the sorting is bad. Let's take for example the case of India and Sweden.

If I remove the legend axis, we can see that Sweden has a higher number than India.

Picture2.png

However, this is no longer the case when I use the legend axis (as the many-to-many generates more cases for India, but the sorting is not updated accordingly).

 

Do you have an idea?

 

Thanks in advance for your help,

 

Vivien

 

1 ACCEPTED SOLUTION
vivien57
Helper II
Helper II

I think I have found a workaround: sort on the one column which is the concatenation of the 2 fields.

I'm still doing tests and I'll keep you informed.

View solution in original post

4 REPLIES 4
vivien57
Helper II
Helper II

Hello everyone,

The concatenation works well.

Have a nice day,

Vivien

mahoneypat
Employee
Employee

If that doesn't work, you can make a measure that CALCULATEs the SUM after you REMOVEFILTERS from the legend column, add that to the visual as a Tooltip and Sort by it in the visual.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


vivien57
Helper II
Helper II

I think I have found a workaround: sort on the one column which is the concatenation of the 2 fields.

I'm still doing tests and I'll keep you informed.

Anonymous
Not applicable

@vivien57  Can you expand more on this solution- I am having a similar issue where I can't figure out what my stacked chart is filtering on. It should be defect percentage (longest to smallest line). Any thoughts?

36C161EA-DE3F-434B-885B-6E4956A06933.jpeg

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

April Fabric Community Update

Fabric Community Update - April 2024

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

March 2024 PBI Gallery Image

Power BI Monthly Update - March 2024

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