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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Ibrahim_shaik
Helper V
Helper V

Line Chart Error Band Color Formatting

Hi Power BI Community,

 

I Created a Line Chart and I have two Lines date on the X-axis and values on the Y axis. To show the difference between the two lines I turned on the error bands to show the shaded area as the difference between the two lines but the issue is when the second line goes above the first line that area is also getting shaded in green.

 

Screenshot 2025-08-21 162510.png

 

I only want to shade the area till the dotted line. I tried to solve this by setting the upper bound for the second line as the dotted line value but it does not solve the issue and is there any way to color the area which is above the dotted line in red.

 

Please Let me know if there is any other way to achieve this.

 

Regards,

Ibrahim. 

2 REPLIES 2
johnbasha33
Super User
Super User

Hi @Ibrahim_shaik 

Power BI’s error bands don’t let you treat one line as a fixed baseline and automatically change the shading above vs. below. They are designed for confidence intervals, so they always just fill between two values. That’s why you see the whole area in green, even when the second line goes above the dotted line.

If you want the shading to change color depending on which line is on top, you need to create measures for the difference. For example, create one measure that returns the positive difference (when line2 is above line1) and another that returns the negative difference (when line2 is below line1). Then plot those measures on an area or combo chart and color them differently, e.g. green when below and red when above.

Another option is to use a custom marketplace visual like a “Difference Chart” that already supports coloring the gap between two lines.

In short: you can’t get that effect with error bands, but you can do it either with calculated measures and an area chart or with a custom visual.

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

Hi @johnbasha33 ,

 

Thank you for the solution.

 

I figured out a way to solve the issue with a measure.

 

Thank you.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors