Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR June 25, 2025: Build on Apache Iceberg with Qlik Open Lakehouse - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
karandeep
Contributor II
Contributor II

Colouring Country Map Charts based on values

Hi there, 

I am trying to colour the country map chart based on the values using the expression below. What I want is if the values are greater than 0 but less than 2 then Green colour, if the values are >2 and <5 then Yellow Colour and if the values are > 5 then countries with these values should change to Red colour on Map Charts however it's not working. Can someone please help, Many thanks. 

if(Sum(Sales) > 5.0, RGB(255,0,0),if(Sum(Sales) > 2.0, RGB(255,191,0),if(Sum(Sales) > 0.0, RGB(255,191,0))))

Labels (1)
1 Reply
rubenmarin

Hi, I suppose the last color is just a typo, the rgb should be green but that code is for yellow.

I tried that expression in a map and it's working, in data->dimension, and in location->field, the dimenson is the country; and in Colors I selected 'by expression' and set that expression, and check the 'expression is a color code' checkbox.

With some dummy values created that meet the requirements the colors are the expected.