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

Creating a diverging bar chart to show sentiment

I am trying to create a diverging bar chart very similar to this post here: https://community.powerbi.com/t5/Desktop/Creating-a-diverging-stacked-bar-chart-to-show-sentiment/m-...

@parry2k 


However, I am not only dealing with two variables (positive vs. negative) but four (Agree, Disagree, Neutral, and Blank values). In the end, I want it to look like this chart:

 tempsnip.png

This would come from three different columns of data. Here is an example of what the data would look like:

Capture.PNG

Ideally, I wouldn't want to include the blank responses in the total %, but I also don't want to filter out the entire row of data as there are still data in the other columns I would like to include.

I am still very fresh to Power BI and cannot find an easy way to do this. It all seems very complicated, and any help would be appreciated! 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 
With 4 variables, you could use a Switch() or Nested IF() to include the 4 values rather than just:

 

 IF ( SELECTEDVALUE( 'Table'[Sentiment] ) = "Negative", -1, 1 )

 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
 

View solution in original post

2 REPLIES 2
SeanNorton
New Member

Hi, I'm also trying to create diverging stacked bar charts that are centered over the neutral midpoint. I've been able to do this quite nicely in Tableau, but I'm being forced to switch to Power Bi at work. I'm new to Power Bi, so any help you can provide would be greatly appreciated. I typically work with 5- to 7-point Likert scales, and having charts that are ordered and stack over the middle of the neutral midpoint is a really slick way to showcase the results. Thank you! 

V-pazhen-msft
Community Support
Community Support

@Anonymous 
With 4 variables, you could use a Switch() or Nested IF() to include the 4 values rather than just:

 

 IF ( SELECTEDVALUE( 'Table'[Sentiment] ) = "Negative", -1, 1 )

 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
 

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.