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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Ptolemaida
Frequent Visitor

How to apply conditional formatting to negative values

I try to transform the negative %'s in RED, and the positive ones in GREEN for the field "AvsF YTD%"pbi vraag.jpg

Entering a large negative number in the first value field does not seem to work

Any tips?

2 ACCEPTED SOLUTIONS
BIswajit_Das
Super User
Super User

Hello  
You can use a conditional field measure for formatting as below;

Measure 2 =
VAR _vaL = [Measure]
RETURN
SWITCH(TRUE(),
_vaL < 0 && _vaL > -0.3, "YELLOW",
_vaL < -0.3 && _vaL > -0.55, "PINK",
"")

FDS.png

@Ptolemaida

View solution in original post

Anonymous
Not applicable

Thanks for the reply from BIswajit_Das , please allow me to add some more information:
Hi  @Ptolemaida ,

 

Here are the steps you can follow:

1. Create measure.

color measure =
IF(
    [AvsF YTD%] >=0 ,"green","red")

2. Select[AvsF YTD%] – Conditional formatting – Background color.

vyangliumsft_0-1739757933004.png

3. Go to the Background color interface.

Format style – Field value

What field should we base this on – [color measure]

vyangliumsft_1-1739757933005.png

4. Result:

 

vyangliumsft_2-1739757965435.png

 

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks for the reply from BIswajit_Das , please allow me to add some more information:
Hi  @Ptolemaida ,

 

Here are the steps you can follow:

1. Create measure.

color measure =
IF(
    [AvsF YTD%] >=0 ,"green","red")

2. Select[AvsF YTD%] – Conditional formatting – Background color.

vyangliumsft_0-1739757933004.png

3. Go to the Background color interface.

Format style – Field value

What field should we base this on – [color measure]

vyangliumsft_1-1739757933005.png

4. Result:

 

vyangliumsft_2-1739757965435.png

 

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

BIswajit_Das
Super User
Super User

Hello  
You can use a conditional field measure for formatting as below;

Measure 2 =
VAR _vaL = [Measure]
RETURN
SWITCH(TRUE(),
_vaL < 0 && _vaL > -0.3, "YELLOW",
_vaL < -0.3 && _vaL > -0.55, "PINK",
"")

FDS.png

@Ptolemaida

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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