cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lawada4
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.

lawada4_0-1671111048890.png

 

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:

lawada4_2-1671111301053.png

 

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

1 REPLY 1
v-jayw-msft
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

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors