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: 
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

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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.

View solution in original post

6 Replies
Anonymous
Not applicable
Author

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
Author

super, thanks!

Not applicable
Author

another question,

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

Anonymous
Not applicable
Author

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
Author

Thanks!!

Not applicable
Author

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))