Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Carlos2
Contributor II
Contributor II

Map Layers - Color Code

Hello,

 

I have 8000+ points of sales and they are divided into three groups (column name = AREA_COBERTURA) which are "DAVID", "PANAMA", "CENTRALES" and I want to set three different colors in the map based on [AREA_COBERTURA]

 

I already tried in the colors tab under the layer to put a if function and it gives me error

IF([AREA_COBERTURA] = "DAVID", red(),

[AREA_COBERTURA] = "PANAMA", blue (),

[AREA_COBERTURA] = "DAVID", green())

 

This approach under expression gives me error.

 

Please help

Labels (1)
1 Solution

Accepted Solutions
Fernando_Fabregas
Creator II
Creator II

Hi Carlos, if() accepts only one or two results. You must put nested IFs to get 3 or more results.

Try this: 

IF( [AREA_COBERTURA] = "DAVID", red(),

IF( [AREA_COBERTURA] = "PANAMA", blue(), green()  ) )

 

Regards, Fernando

View solution in original post

1 Reply
Fernando_Fabregas
Creator II
Creator II

Hi Carlos, if() accepts only one or two results. You must put nested IFs to get 3 or more results.

Try this: 

IF( [AREA_COBERTURA] = "DAVID", red(),

IF( [AREA_COBERTURA] = "PANAMA", blue(), green()  ) )

 

Regards, Fernando