Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

color code

Hi all

I have a gauge chart   with  expression   so same I have to show in   table box with bg color

so how can I use?

expression I have placed in variable

vMyExpression  =This expression is big so I  want to use variable in bg colour

logic:     0-80% red,  80%-90% amber   >90% green

1 Solution

Accepted Solutions
pooja_prabhu_n
Creator III
Creator III

Hi,

variable can not hold multiple values.If the expression is big you can perform the calculations at script level.

with your expression you can try something like below.

=if(vMyExpression>90,RGB(0,204,0),if(vMyExpression>=80 and vMyExpression<=90,RGB(255,255,0),if(vMyExpression<80,RGB(255,0,0))))

Thanks,

Pooja

View solution in original post

3 Replies
pooja_prabhu_n
Creator III
Creator III

Hi,

variable can not hold multiple values.If the expression is big you can perform the calculations at script level.

with your expression you can try something like below.

=if(vMyExpression>90,RGB(0,204,0),if(vMyExpression>=80 and vMyExpression<=90,RGB(255,255,0),if(vMyExpression<80,RGB(255,0,0))))

Thanks,

Pooja

vvira1316
Specialist II
Specialist II

Following may help

Relative Text Color expression

May be your vMyExpression evaluation is going wrong.

soniasweety
Master
Master
Author

thanks its working now