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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.