Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
clovati
Partner - Creator
Partner - Creator

color in a variable

Hi all.

I want to colour background EXPR1 and wrote this in BACKGROUND COLOR:

if (Sum([EXPR1]) <= NUM, $(vColorBlack), $(vColorGreen))

where

vColorBlack=ARGB(100,0,0,0)

vColorGreen=ARGB(100,0,128,0)

The colors don't appear.

What should I write? I use varaibles because the colors can be changed very fastly.

thanks

Message was edited by: cristina lovati

1 Solution

Accepted Solutions
amit_saini
Master III
Master III

Yes ,

Sunny and Gysbert...u guy's having eagle eyes

Thanks,

AS

View solution in original post

12 Replies
sunny_talwar

Is EXPR1 a field or is this expression label here? Also try the variables without the dollar sign expansion:

If(Sum([EXPR1]) <= NUM, vColorBlack, vColorGreen)

miguelbraga
Partner - Specialist III
Partner - Specialist III

Hey there,

Have you put this expression as suggested in the following post?

Using RGB() and ARGB() to define colors

If not, try it. If yes, how and where did you wrote yiur variables?

Hope this helps,

Regards,

MB

Gysbert_Wassenaar

The syntax of the expression you posted looks correct. Can you post a small qlikview document that demonstrates the problem?


talk is cheap, supply exceeds demand
amit_saini
Master III
Master III

Try:

First:

Later:

Thanks,

AS

nizamsha
Specialist II
Specialist II

if (Sum([EXPR1]) <=10, NUM, $(vColorBlack), $(vColorGreen))

if its not working check the file

amit_saini
Master III
Master III

Sorry forgot to mention : U also need to use condition:

if (Sum([EXPR1]) <= NUM, $(vColorBlack), $(vColorGreen))

Thanks,AS

vcanale
Partner - Creator II
Partner - Creator II

Hi,

It should work without dollar sign
if (Sum([EXPR1]) <= NUM, vColorBlack, vColorGreen)

clovati
Partner - Creator
Partner - Creator
Author

Just attached. The wish is in the background of the only expression (in comment). Thanks

sunny_talwar

Seems to be working for me

Capture.PNG

The only issue was the one of the variables were using ARGC instead of ARGB