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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors