Qlik Community

Qlik GeoAnalytics Discussions

Discussion Board for collaboration regarding Qlik GeoAnalytics.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
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?

1 Solution

Accepted Solutions
Highlighted
3 Replies
Highlighted
Highlighted
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

Highlighted
Contributor III
Contributor III

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