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
Anonymous
Not applicable

Centered 100% stacked bar chart

Hello,

 

I want to create a 100% stacked bar chart with a centered center. The data contains satisfaction figures and I would like to make it clear at a glance which components are good and which ones do not. Below is an example of how I like it. Only the legend is not sorted correctly.

 

I hope somebody here has a solution.

Thank you very much!

Greetings, Tiemen

Knipsel.PNG

12 REPLIES 12
RMO
Advocate I
Advocate I

Have you been able to find a fix for this issue? I'm able to center the chart, however the sorting for the negative values is reversed. 

Hi @RMO ,

 

Are you using a column to have the legend on your values or are they separate measures?

 

If you are using different measures your need to place them in the order you need so the sorting is correct. If you have a column that you use for legend you need to add an additional column to sort them out and your chart will be correct.

 

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks for the response. The issue isn't with the legend not sorting, because that's sorting correctly. It's the chart itself. If you look at OP's first image, the negative values in the chart are 3,2,1 when they should be 1,2,3. It's essentially correct because the values are ordered (-11 < -14) but we're looking for a workaround that reverses the order without taking the absolute value. 

Hi @RMO ,

 

The questions is also regarding the legend, since the legend presents the order how your values are.

 

I just did a simple column with 3 values:

MFelix_0-1619019115432.png

If I do the chart without using the Sort column to sort the category you get the result below:

MFelix_2-1619019451651.png

 

If you do the sorting you can see that the chart and the legend changes:

MFelix_3-1619019497363.png

Has you can see the sorting is important and should be done.

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Yes, all this works fine when the standard 100% stacked chart is used as it is. What we're doing is centering the chart on the middle value, which is how we end up with the negative and positive values. If you review OP's previous responses, they explain it all there. 

Hi @RMO ,

 

If this is a question about centering you need to set the maximum values of the axis with same value in this case I have made 100% and -100% but if the chart goes above those values you will loose information.

 

MFelix_0-1619020362440.png

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@gopichilla @Greg_Deckler @MFelix 

 

Thank you for your response! To further illustrate my robleem, I have further developed the example. If I use the 100% stacked bar chart, I get the following without any adjustments. It is not as clear as to which parts the assessment is good or very good.

before.PNG

After a small adjustment (the negative and neutral ratings give a -1 score) I get the following bar chart.

after.PNG
However, in the bar chart I want to start the order of the reviews to start with very bad instead of neutral as is the case now. In addition, I want to show the scores as a positive number. So at the first part, 11% 7% and 14% instead of -11% -7% and -14%. I hope this explanation makes my problem clearer.

 

after2.PNG

Not sure what metric you are using in that graph but you should be able to wrap it in an ABS in order to always return a positive value.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thnx @Greg_Deckler I will try it out!

gopichilla
Resolver III
Resolver III

Can you go to this way it will help you I hope?

 

Go to data view panel ->modling ->sort columns (ASC/DSC).

 

Thanks

 

Greg_Deckler
Super User
Super User

Maybe a custom visual like Table Sorter or Tornado?

 

https://app.powerbi.com/visuals/

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
MFelix
Super User
Super User

Hi @Anonymous,

 

Not sure if I'm understanding your question correctly, when I make a table with the information that I see on the image you posted, I get the exact image as you have it.

 

Stacked_Chart.png

 

Do you want to highlight the center values? Do you want to have your information in a diffent order?

 

Sorry for the questions but as you can see I achieve the same as you.

 

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.