Announcements
cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Background Color?

Hi,

I have an expression and will like to add a background color based on the result of that expression. How can I do it?

I mean I need that the field is set to Red if value is higher than 0.5 and green if it's lower than 0.5.

1 Solution

Accepted Solutions
Creator II

Try the below expression:

if([Escalation Request Rate]>5/100,Red(),Green())

20 Replies

If(Field > 0.5, Red(), If(Field < 0.5, Green())

Or

If(Field>0.5, Red(), Green())

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

I mean, the expression is a field calculated that is a percentage, what should be the field that I should use? or it will works if I use the name of the expression?

MVP

I think you need to use the whole expression or you can use expression label

Anonymous
Not applicable
Author

Ok, something is not working.

I want to have all the pair months on grey, but also will like to have an specific color the expression is higher than 0.5 and another one if the expression is lower than 0.5.

This is what I am trying:

if (mod(Month,2)=0, RGB(128,130,133)) or if ([Escalation Request Rate] > 0.05, RBG('RED'), RGB (Green))

What am I doing wrong?

May be this

Here i am assuming month is in Number format

if (mod(Month,2)=0, RGB(128,130,133) or [Escalation Request Rate] > 0.05, RED(), Green())

Or

if (mod(Month,2)=0, RGB(128,130,133),If(Sum([Escalation Request Rate]) > 0.05, RED(), Green()))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
MVP

Is [Escalation Request Rate] your expression or expression label here?

Anonymous
Not applicable
Author

Yes, Escalation Request Rate is a field that will display percentage, however the expression is not working.

I have removed the first part if (mod(Month,2)=0, RGB(128,130,133)

But I am still not getting the right colors.

if ([Escalation Request Rate] > 0.05, RED(), Green())

I am seeing records in green where Escalation Request Rate is higher than 0.5%

MVP

Would you be able to share a screenshot of your chart and your background expression?

Anonymous
Not applicable
Author

The background expression is if ([Escalation Request Rate] > 0.05, RED(), Green())

As you can see the first 6 records are OK, but the seventh is not.

Community Browser