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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
JDIreland
New Member

Report Builder - Expression for background colors assistance

Hi there,

 

I am building a table report in Report Builder. The report has 3 colour ranges for Red, Amber and Green.

Red is values equal to or more than 7

Green is qual to or less than 4
Amber is anything else (which equates to 5 and 6 in this example)

In the 'Properties>Fill>BackgroundColour' of the desired Field, I have used a simple expression =IIF(Me.Value < = 4, "Green", "Orange") to cover Green and Amber colours and it works correctly - but whatever I try to do to add in a value for Red (> = 7 "Red") in the expression or by other means - I just cant find the right expression to that works, mostly getting an error. Just looking to see if someone can assist here and shed light on what will work for me as I have searched tutorials extensively and either have totally missed it or my particualt usecase is not present.


Many thanks

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Have you tried nesting like this?

IIF(Me.Value <= 4, "Green", IIF(Me.Value >= 7, "Red", "Orange"))

 

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

Have you tried nesting like this?

IIF(Me.Value <= 4, "Green", IIF(Me.Value >= 7, "Red", "Orange"))

 

Hello, I am guessing you can figure this out, what is the syntax for two conditions?  This is what I tried and its not working for me:

 

IIF(Fields!PHYCAP.Value >= 250 & Fields!SUM_INA_AVAIL_.Value >= 500, "Aqua",IIF(Fields!PHYCAP.Value >= 101 & Fields!PHYCAP.Value <= 249 & Fields!SUM_INA_AVAIL_.Value >= 250, "Aqua",IIF(Fields!PHYCAP.Value < 100 & Fields!SUM_INA_AVAIL_.Value >= 50, "Aqua","White")))

 

I very much appreciate any help you can provide!

FIXED IT:

=IIF(Fields!PHYCAP.Value >= 250 AND Fields!SUM_INA_AVAIL_.Value >= 500, "Aqua", IIF(Fields!PHYCAP.Value >= 101 AND Fields!PHYCAP.Value <= 249 AND Fields!SUM_INA_AVAIL_.Value >= 250, "Aqua", IIF(Fields!PHYCAP.Value < 100 AND Fields!SUM_INA_AVAIL_.Value >= 50, "Aqua", "White")))

Hi Alexis. This worked perfectly. Thank you very much for helping me out!

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 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.