Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
melissatw
Contributor II
Contributor II

Set colors in a file

Hello everyone,

 I created 2 tables having the same structure but eachone filtered on a field ARTICLE TYPE.
 So we have Table 1 with article type A and table 2 with article type B.

 On these tables I have a Delta class column based on the Delta field created as follow:

 = if Delta> -0,1 then "less than 10%" else if Delta> -0,2 then "10 to 20%" else "more than 20%"


 In this column, the color of the background is dynamic with the following formula:

 = if Delta> -0,1 then rgb (255,106,106) else if Delta> -0,2 then rgb (255,0,0) else rgb (0,0,0)

 The problem is that no user can get hold of these values ​​and it is not very optimal to maintain.
 So I thought of making an excel file like this:

 Article Type | Min | Max | color
 A | 0.1 | # | 255,106,106
 A | 0.2 | 0.1 | 255,0,0
 A | # | 0.2 | 0,0,0
 B | 0.5 | # | 255,106,106
 B | # | 0.7 | 255,0,0

 In the LOAD, I loaded this data into the Article Type table by adding the columns Min, Max and Color,
 on the other hand in the PRES I do not see at all how to recover the colors in the property Background ???

 Would anyone have an idea please?
 Or an idea for another method?

 thanks in advance

Labels (4)
3 Replies
sunny_talwar

Instead of bringing the color value in one column, bring them in 3 different column. R value, G value, B value and then use it like this

RGB([R value], [G value], [B value])
melissatw
Contributor II
Contributor II
Author

Thanks for your answer but my main question is how to use this values in a chart as background color like this : 

Image1.png

sunny_talwar

Would you be able to share a sample to show what you already have?