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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PowerBIWhat
Helper I
Helper I

Colour plot background of line chart on a gradient

Hi,

 

I have a line chart showing revenue growth year on year.

 

I want to colour the plot area background conditionally.

 

I.e. everything in the background below 0% e.g. negative growth I want the background to be red and for everything above 0% e.g. positive growth I want the background to be green,

 

I made an image with the green/red and put that as the background but as I change the filters the 0% isn't always in the same place which means the image in the background doesn't fit. 

 

Is there a way to do this dynamically?

 

Thanks,

 

O

1 ACCEPTED SOLUTION
Mayank_Yavda
Resolver II
Resolver II

Hi @PowerBIWhat,

 

Here is Line chart with conditional background colour formatting which will help you to get conditional background if the line value is positive then are behind it will be green and red otherwise.

Line Chart with Conditional Background Colour, PBIVizEdit.comLine Chart with Conditional Background Colour, PBIVizEdit.comLine Chart with Conditional Background Colour, PBIVizEdit.comLine Chart with Conditional Background Colour, PBIVizEdit.com

 

 

 

 

 

 

 

 

Download link for the custom visual file in this page,

https://pbivizedit.com/gallery/line-chart-with-conditional-background-colour-formatting 

 

This was made with our Custom Visual creator tool PBIVizEdit.com. With this tool,

  • anyone, irrespective of technical skills, can create their own visuals
  • 15 minutes to create a visual from scratch
  • opens up many additional attributes to edit (for e.g. labels, tooltips, legends position, etc)

Give this a shot and let us know if you face any problem/errors.
You can use the editor to modify your visual further (some modifications cannot be done in Power BI window and have to be in editor).

Thanks,
Team PBIVizEdit

View solution in original post

2 REPLIES 2
Mayank_Yavda
Resolver II
Resolver II

Hi @PowerBIWhat,

 

Here is Line chart with conditional background colour formatting which will help you to get conditional background if the line value is positive then are behind it will be green and red otherwise.

Line Chart with Conditional Background Colour, PBIVizEdit.comLine Chart with Conditional Background Colour, PBIVizEdit.comLine Chart with Conditional Background Colour, PBIVizEdit.comLine Chart with Conditional Background Colour, PBIVizEdit.com

 

 

 

 

 

 

 

 

Download link for the custom visual file in this page,

https://pbivizedit.com/gallery/line-chart-with-conditional-background-colour-formatting 

 

This was made with our Custom Visual creator tool PBIVizEdit.com. With this tool,

  • anyone, irrespective of technical skills, can create their own visuals
  • 15 minutes to create a visual from scratch
  • opens up many additional attributes to edit (for e.g. labels, tooltips, legends position, etc)

Give this a shot and let us know if you face any problem/errors.
You can use the editor to modify your visual further (some modifications cannot be done in Power BI window and have to be in editor).

Thanks,
Team PBIVizEdit

Anonymous
Not applicable

Hi  @PowerBIWhat ,

 

Not very clear what you mean... Can you describe the result you want in the form of pictures, we can help you better.

If convenient, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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