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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Bar Chart - Shade Between Values

Hello - 

 

I'm trying to tell a story with what's happening in one of my charts. It's a Bar Chart with values on the x-axis and categories on the y-axis. I want to shade between certain values and be able to add contex on what's happening. 

 

I've attached a screenshot for you to preview how ideally this would look. Is there a way to do this in Power BI? I'm using the constant lines on the analytics section, however, I can't shade between the areas. Or at least I haven't figured it out yet. 

 

Here's an Example. Notice the 4 shades of colors. 

 

BarChart.PNG

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Anonymous ,

 

This is not possible directly, and I assume your axis will grow in context related like filtering and so on.

 

You can try to add an image on the background of your chart but that woul implie that you would have the exact size of your chart especcially the x-axis always on the same size, other option can be using the stacked bar chart and using 3 measures for example:

 

0 to 40 = if (SUM('Table'[Value]) < 40, SUM('Table'[Value]), 40 )

40 to 50 = if(SUM('Table'[Value]) > 50 , 50 - 40,SUM('Table'[Value]) - [0 to 40] )

OVER 50 = if(SUM('Table'[Value]) > 50 , SUM('Table'[Value]) - [40 to 50] - [0 to 40] )

 

Then using this measures you can do the following formatting:

 

MFelix_0-1613749627344.png

Has you can see both charts are equal but they have the highlight on the bar. Then using the legend you can use the names you need.


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 @Anonymous ,

 

This is not possible directly, and I assume your axis will grow in context related like filtering and so on.

 

You can try to add an image on the background of your chart but that woul implie that you would have the exact size of your chart especcially the x-axis always on the same size, other option can be using the stacked bar chart and using 3 measures for example:

 

0 to 40 = if (SUM('Table'[Value]) < 40, SUM('Table'[Value]), 40 )

40 to 50 = if(SUM('Table'[Value]) > 50 , 50 - 40,SUM('Table'[Value]) - [0 to 40] )

OVER 50 = if(SUM('Table'[Value]) > 50 , SUM('Table'[Value]) - [40 to 50] - [0 to 40] )

 

Then using this measures you can do the following formatting:

 

MFelix_0-1613749627344.png

Has you can see both charts are equal but they have the highlight on the bar. Then using the legend you can use the names you need.


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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.