Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
becki_kain
Contributor III
Contributor III

setting background color based on value of expression

this is in qlik 12, if it matters.  I have a hugely long/complex expression, in a pivot table, labeled A.  I want to change the background color of the cell, based on the value of this expression, to red, yellow or green.  all i can find, searching here, is how to change color based on the value of a variable or based on the value of a dimension.  this is neither.  do i really have to put :

if (HUGEEXPRESSION)>-.1, $vgreen

i was hoping i could do something like :

If (A>.1), $vgreen

but that doesn't work.   is this possible?

thanks

becki kain

6 Replies
jerem1234
Specialist II
Specialist II

Hi becki,

    If you are trying to edit the background color on the expression tab, then yea you can. The formula would be like:

    if (A =16, red())

    Please find attached.

    Hope this helps!

vinod22kv
Creator
Creator

Hi,

There is a opection called visual cues in qlikview you can trye that. it is usefull for your requrement.

Regards,

Vinod.

becki_kain
Contributor III
Contributor III
Author

yes thanks

do you have a way to do If A>.2 and A<1 (nested if statements)?

jerem1234
Specialist II
Specialist II

Yep, something like:

if (A >5 and A <17, red())

jerem1234
Specialist II
Specialist II

You can also do something like:

if (A >5 and A <17, red(),

if(A>50, rgb (50, 120, 50), rgb(100, 100, 100)))

becki_kain
Contributor III
Contributor III
Author

i was getting caught up in () and where they should go!  thanks