Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Adding multiple color (RGB) values in Expression

Hello,

I'm struggling with adding a specific rgb colorvalue to a specific mapped value, when im plotting a bubble area. For example I've two 2 data tables with a keyfield which is called "ID".

IDName
1003HOSR
1005DBLB
1006JZJB
1007IVRH
1008PEOM

IDRGB value
1003204,51,153
1005204,51,77
1006204,153,102
1007204,179,51
1008204,255,255

Now I would like to use an expression which tells GeoAnalytics which RGBcode it needs to use for each ID or Name.

Does anyone have a proper solution for this?

1 Solution
3 Replies
Patric_Nordstrom
Employee
Employee

HI Guy,

QGA accepts CSS colors so ='rgba(' & RGBValue & ',1)'

as a string would be the quickest fix.

Splitting up RGB Value in components would also work, either at load time or in expression

=rgb(subfield(RGBValue ,',',1),subfield(RGBValue ,',',2),subfield(RGBValue ,',',3))

Thanks,

Patric

Anonymous
Not applicable
Author

Thanks stalwar1‌!

I've tried this one and it's working superb!

I've splitted the RGB code to 3 columns and use the following expression:

=if(Not IsNull(Concurrenten_Gebied_#),RGB(R,G,B))