Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Colors per cel

Dear all,

I want to make a pivot table with the following:

CodeColor
10color
20color
30color
40color

The colom "color" I want to fill with the concerning colors. For these I have the RGB color codes.

for example:

10 = RBG: red 210, green 219, blue 93

20 = RGB: red 151, green 53, blue 64

30 = RGB: red 127, green 74, blue 76

40 = RGB: red 145, green 113, blue 50

is there a possibility to do this?

thanks in advance!

Best Regards,

Sander

Tags (1)
1 Solution

Accepted Solutions

Re: Colors per cel

On the Expressions tab to the left of your expression, click the + and select Background Color.

In there put an expression like :

    if ( Code  = 10 , rgb(210,219,93)

You can make the expression with more nested if as per your needs.

6 Replies

Re: Colors per cel

On the Expressions tab to the left of your expression, click the + and select Background Color.

In there put an expression like :

    if ( Code  = 10 , rgb(210,219,93)

You can make the expression with more nested if as per your needs.

Not applicable

Re: Colors per cel

super, thanks!

Not applicable

Re: Colors per cel

another question,

what if I want to make more selections in 1 filter?

Re: Colors per cel

Do you mean a nested if something like :

    if ( Code  = 10 , rgb(210,219,93) ,

    if ( Code  = 20, rgb(151,53,64) ,

    if ( Code  = 30, rgb(127,74,76) ,

    if ( Code  = 40, rgb(145,113,50) ) ) ) )

Not applicable

Re: Colors per cel

Thanks!!

Not applicable

Re: Colors per cel

instead of nested of ifs we can also write

pick(match(code,10,20,30,40), rgb(210,219,93),rgb(151,53,64), rgb(127,74,76), rgb(145,113,50))

Community Browser