Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
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

View solution in original post

vvira1316
Specialist II
Specialist II

Following may help

Relative Text Color expression

May be your vMyExpression evaluation is going wrong.

soniasweety
Master
Master

thanks its working now