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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
bobbob123
Helper III
Helper III

Conditionally Format Area Chart

Hi,

 

I would like to condtionally format my area chart.  I have a profit, area and year column.

I would like format the chart so that if the profit value is below 0, then the chart is red. If it is above 0 then the chart is green.

 

I don't know how to attach the a PBI file, but I've attached an Image.Screenshot 2022-04-18 073743.png

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @bobbob123 ,


It seems a bit odd, but the best way to display it would be as follows.

M1 = IF([M_value]<0,[M_value],0)
M2 = IF([M_value]>0,[M_value],0)

 

vhenrykmstf_0-1650964675064.png

vhenrykmstf_1-1650964686357.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

View solution in original post

14 REPLIES 14
v-henryk-mstf
Community Support
Community Support

Hi @bobbob123 ,


It seems a bit odd, but the best way to display it would be as follows.

M1 = IF([M_value]<0,[M_value],0)
M2 = IF([M_value]>0,[M_value],0)

 

vhenrykmstf_0-1650964675064.png

vhenrykmstf_1-1650964686357.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

but this is not a solution to my problem. the final graph is not an accurate representation of my original graph.

bobbob123
Helper III
Helper III

Hi,

 

This is my data.My data in a table.My data in a table.

 

All i want to do is draw the area chart so that if it is below 0 then the colour is all red, if it above 0 then the colour is all green.

v-henryk-mstf
Community Support
Community Support

Hi @bobbob123 ,

 

The link you provided is temporarily inaccessible.

 

I want to say that something like AREA VISUAL does not support adding a similar judgment condition. I think you can try stacked column chart and create a measure as a conditional judgement. Refer to the following test results.

M = IF(MAX('Table'[Value])<0,"red","green")

vhenrykmstf_0-1650431228058.png

not work in area visual

vhenrykmstf_1-1650431278196.png


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

This is what I want to achieve. 

 

my result.png

Hi @bobbob123 ,

 

I understand your needs. In my reply I already pointed out that something like AREA VISUAL does not support this kind of display. You can try to use a visual like stacked column chart instead.


Best Regards,
Henry


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

What about something like this video??

 

https://www.youtube.com/watch?v=-mAFHM1_bXc

Hi @bobbob123 ,

 

The video you provided requires you to create two separate measures instead of the value field. Is this approach acceptable to you?


Best Regards,
Henry

 

I'm happy with what ever solution. As long as it works 🙂 

Hi @bobbob123 ,

 

That's pretty good. You can follow the steps in the video to get the results you want.

 

If the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

 

I coulnd't replicate the video 😞 

 

This is why I need help! 

Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Sorry but cannot help you with this.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.