Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

rgb

Hi Friends,

How to we use rgb() function at expression level could you give me the brief explanation ?

in my Chart i have dimension like Department_ID.

my Expression is Sum(salary).

I would like to segregate salary like 2000 to 3000  and 30001 to 40000 another colour one color how can achieve  this ?

9 Replies
Not applicable
Author

Hi Siva,

Click on the + icon in your expression and click on back ground color . In its definition, enter your necessary condition.

Eg:

If([Q2]>[Q1], rgb(108,179,63),

If([Q2]=[Q1], yellow(),

If([Q2]<[Q1], rgb(255,110,110))))

Hope it helps!

Kiruthiga

devarasu07
Master II
Master II

Hi,

refer to the attached sample app

Try like this  at background Color,

if(sum(Salary) > 2000 and sum(Salary) <= 3000 ,rgb(108,179,63),

if(sum(Salary) > 30001 and sum(Salary) < 40000 ,rgb(108,179,63),yellow()))

33.JPG

Tks

Deva

varshavig12
Specialist
Specialist

Example:

If you want to change the background color,

i.e properties --> expression --> Your exp --> Background color

and in background color definition:

if(sum(Salary)>=2000 and <=3000, rgb(100,0,0),

if(sum(Salary)>=3001 and <=4000, rgb(100,100,0)))

amit_saini
Master III
Master III

Hi Siva,

You need to do something like below:

Thanks,

AS

ramasaisaksoft

Hi Siva,

instead of writing RGB() function in Straight table we have option

Properties of the S.table->Visual Cause Tab select the expression to which you want to show different colors->

sum(Sales)>100 Red

<100 Green color

like that u will get default 3 colors u can change these colors also as per your wish.

Not applicable
Author

Hi

Thnaks

Not applicable
Author

Hi

Thanks

Not applicable
Author

Hi Varha,

Thanks.

varshavig12
Specialist
Specialist

If you got the solution, Please mark that comment as correct and close the thread.

Regards,

varsha