Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Maintain RGB colors (with use of variable)

I've made an overview of colors to use on my dimensions:

=if(='1',RGB(0,0,0),

if(='2',RGB(255,0,0),

if(='3l',RGB(200,164,31))))

When I apply this colormapping in 'Expressions - Backgroundcolor' everything goes well. But when created a variable that contains the above expression and saved as '=$(vColor)'., when I use the variable '=$(vColor)' in 'Expressions - Backgroundcolor' it does't seem to work.

1 Solution

Accepted Solutions
MVP
MVP

Re: Maintain RGB colors (with use of variable)

try to define the variable without =  (see image)

if([Indicatif]='AAAA',RGB(0,0,0),

if([Indicatif]='BBBB',RGB(255,0,0),

if([Indicatif]='GGGG',RGB(200,164,31))))

background expression

$(vColor)

1.png

6 Replies

Re: Maintain RGB colors (with use of variable)

Use

=vColor without $ ....

Let me know

rustyfishbones
Honored Contributor II

Re: Maintain RGB colors (with use of variable)

Use $(vColor)

MVP
MVP

Re: Maintain RGB colors (with use of variable)

try to define the variable without =  (see image)

if([Indicatif]='AAAA',RGB(0,0,0),

if([Indicatif]='BBBB',RGB(255,0,0),

if([Indicatif]='GGGG',RGB(200,164,31))))

background expression

$(vColor)

1.png

Not applicable

Re: Maintain RGB colors (with use of variable)

Thanks Massimo. Now when I adjust the rgb code in the variable, the colors change automatically (which until now had not yet succeeded).

Re: Maintain RGB colors (with use of variable)

Write a variable like

Let vColor =if(='1',RGB(0,0,0), if(='2',RGB(255,0,0), if(='3l',RGB(200,164,31))))

And in the Background use it like =$(vColor) or you can use vColor

MVP
MVP

Re: Maintain RGB colors (with use of variable)

Please close this discussion by giving Correct and Helpful answers to the posts which are useful for you.  It helps others in finding answers for similar scenarios.

Community Browser