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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Gianlucariotti
Regular Visitor

Horizontal bar charts with custom center line

Hi everyone,

I'm trying to replicate in Power BI a visual I had no problems creating in excel.

It's a horizontal bar chart where the center line on the x axis is 100. If a value is over 100 the bar goes right, otherwise it goes left (See below)horzontal bar chart.png 

From what I've found reading other threads I didn't find a solution: it seems in Power BI there's no equivalent option to that "vertical axis crosses" you see in excel. I've tried a workaround using the tornado visual but it doesn't suit my needs, since the bars diverge differently.

 

Does anybody have any idea on how to solve this? 

Thanks,

Gianluca 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Gianlucariotti ,

 

You can do this by making some measures and tweaking the chart in order to have the correct values.

 

Create the following measures:

 

Values below 100 = 
IF(SUM('Table (2)'[VAlue]) <= 100 , SUM('Table (2)'[VAlue]))

Until 100 values = IF(SUM('Table (2)'[VAlue])<= 100, 100-SUM('Table (2)'[VAlue]))

100 values = IF(SUM('Table (2)'[VAlue])> 100, 100)

values above 100 = if(SUM('Table (2)'[VAlue]) > 100 , SUM('Table (2)'[VAlue]) -100 )



Label over 100 = if(SUM('Table (2)'[VAlue]) > 100, SUM('Table (2)'[VAlue]))

 

 

Now create a stacked bar chart and place the measures in the following order:

Values below 100

Until 100 values

100 Values

values above 100

label over 100

 

Now on the setup of your chart do the following:

Colors of the measure below should be white (or equal to background)

values below 100

100 values

label over 100

 

data labels for all of the measure below should be turn off:

until 100 values

values above 100

100 values

 

Labels for the measure below should be place on specified location:

values below 100 - inside end

Label over 100 - inside start

 

Set the x-axis maximum value to 100

 

You should also do a custom tooltip instead of the normal one.

 

Result below and in attach file.

MFelix_0-1624614983795.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



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @Gianlucariotti ,

 

You can do this by making some measures and tweaking the chart in order to have the correct values.

 

Create the following measures:

 

Values below 100 = 
IF(SUM('Table (2)'[VAlue]) <= 100 , SUM('Table (2)'[VAlue]))

Until 100 values = IF(SUM('Table (2)'[VAlue])<= 100, 100-SUM('Table (2)'[VAlue]))

100 values = IF(SUM('Table (2)'[VAlue])> 100, 100)

values above 100 = if(SUM('Table (2)'[VAlue]) > 100 , SUM('Table (2)'[VAlue]) -100 )



Label over 100 = if(SUM('Table (2)'[VAlue]) > 100, SUM('Table (2)'[VAlue]))

 

 

Now create a stacked bar chart and place the measures in the following order:

Values below 100

Until 100 values

100 Values

values above 100

label over 100

 

Now on the setup of your chart do the following:

Colors of the measure below should be white (or equal to background)

values below 100

100 values

label over 100

 

data labels for all of the measure below should be turn off:

until 100 values

values above 100

100 values

 

Labels for the measure below should be place on specified location:

values below 100 - inside end

Label over 100 - inside start

 

Set the x-axis maximum value to 100

 

You should also do a custom tooltip instead of the normal one.

 

Result below and in attach file.

MFelix_0-1624614983795.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



Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors