Forum Discussion
Line Chart Error Band Color Formatting
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.