Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Geo Maps Color by expression is not working

Hi all,

I am having a issue while trying to establish a color by expression on a chart layer.  Every time the number of items is bigger than 1, the color is gray.

Dimension = Country

Slice = Rank 

Measure: # Items

If I use the color by dimension (Slice) I get the correct visualization with the Qlik Sense default colors. When I try to use the color by expression:

=if( Rank<=20, 'green', if (Rank>20 and Rank<=40, 'yellow', if (Rank>40, 'red')))

The expression work but only when the #Items = 1, as soon as I get more than one, the color goes to gray.




Does anyone know how to solve this issue?

Thank you,


1 Reply

Try this:

=if( Only(Rank)<=20, 'green', if (Only(Rank)>20 and Only(Rank)<=40, 'yellow', if (Only(Rank)>40, 'red')))