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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Frequent Visitor

create area chart with green and red colors to indicate profit and loss

I have created area chart that that shows profit and loss % over time. I would like to show the loss (negative part) in red color and the profit ( positive part) in geen color.



i created 2 measures one for profit % and one for loss % 

positive p&l =
var pl=[p&l %]
var result= IF(pl>0 , pl,0)
return result
negative p&l =
var pl=[p&l %]
var result= IF(pl<0 , pl,0)
return result


when i added the measures in the chart it looked  like:



any idea on how to create the area chart with green/red colors instead of 1 color

Community Support
Community Support

Hi @lawada4 ,


Please share some sample data so that we could test the formula.



Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City


Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors