Qlik Community

Qlik GeoAnalytics Discussions

Discussion Board for collaboration regarding Qlik GeoAnalytics.

guy_hombleu
New Contributor III

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?

Tags (1)
1 Solution

Accepted Solutions

Re: Adding multiple color (RGB) values in Expression

3 Replies

Re: Adding multiple color (RGB) values in Expression

Employee
Employee

Re: Adding multiple color (RGB) values in Expression

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

guy_hombleu
New Contributor III

Re: Adding multiple color (RGB) values in Expression

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

Community Browser