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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
PBIraja
Frequent Visitor

conditional formatting

Hi,

how to apply the  background color based on below conditions.

 

  1. +-5% format the the cell background to YELLOW 
  2. greater than 5% format the cell background to GREEN 
  3. less than -5% format the cell background to RED 

 

thanks,

raja.

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @PBIraja 

 

You can try the following methods.

Measure:

Measure =
IF (
    SELECTEDVALUE ( 'Table'[Change] ) <= -0.05,
    "Red",
    IF ( SELECTEDVALUE ( 'Table'[Change] ) >= 0.05, "Green", "Yellow" )
)

Apply Measure to the background color of the percentage as shown in the figure.

vzhangti_0-1648101776372.pngvzhangti_1-1648101806754.png

Is this the result you expect?

vzhangti_2-1648101890119.png

 

Best Regards,

Community Support Team _Charlotte

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

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @PBIraja 

 

You can try the following methods.

Measure:

Measure =
IF (
    SELECTEDVALUE ( 'Table'[Change] ) <= -0.05,
    "Red",
    IF ( SELECTEDVALUE ( 'Table'[Change] ) >= 0.05, "Green", "Yellow" )
)

Apply Measure to the background color of the percentage as shown in the figure.

vzhangti_0-1648101776372.pngvzhangti_1-1648101806754.png

Is this the result you expect?

vzhangti_2-1648101890119.png

 

Best Regards,

Community Support Team _Charlotte

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

PBIraja
Frequent Visitor

Hi all

 

Any Logic for the above issue?

amitchandak
Super User
Super User

@PBIraja , Assume you measure based on that you need that +/-

 

a new measure =

Switch(True() ,

[Measure] *.95 , "Red",

[Measure] * 1.05 , "Green",

"Yellow"

)

 

use this conditional formatting using the field value option

How to do conditional formatting by measure and apply it on pie? : https://youtu.be/RqBb5eBf_I4

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

PBIraja_0-1647866614196.png

Can you suggest like this.

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.