Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
clarachac
Contributor III
Contributor III

Coloring a map

Hello,

I have a map of Europe with the percentage of pollution in each country.
I would like to color the map going from light yellow for the country with the least pollution, and a 'dark' yellow for  the country with the most pollution.
I have tried this but it doesn't work : 

colormix1(RANK(Num(Sum({<Continent={'Europe'}>}[nbre_usines])/
sum(aggr({<Continent={'Europe'}>}[xxx]),country)
, '##,##%'),0)

,white(),RGB(255,205,0))

 

Labels (1)
1 Solution

Accepted Solutions
clarachac
Contributor III
Contributor III
Author

Thank you all for your answers.

I followed @steeefan's answer, and I used the colors by measure.
I created a Master Item Measure where I chose the colors that I want (cf. image)

clarachac_0-1705489761518.png

 

View solution in original post

6 Replies
steeefan
Luminary
Luminary

If you have the countries on the map as an Area layer, coloring from light to dark is a basic functionality of the map object:

steeefan_0-1705484748110.png

For the measure, select the one giving the pollution values, then choose the desired color scheme.

clarachac
Contributor III
Contributor III
Author

Yes but I can't choose the color I want, I'm stuck with the color scheme given by QlikSense.
Is there an option to choose the color I want? 

steeefan
Luminary
Luminary

Unfortunately, I do not believe this to be possible out of the box with the Qlik Sense map object. These workarounds might however work for you:

Rohan
Specialist
Specialist

Hi @clarachac ,

The issue with Colormix1 function is that the expression used for the colour grading should lie between 0-1, It seems you have used rank() as your colouring expresession. Try to remove rank & then use the expression, it seems your formula will evaluate into '#0%' values laying between 0-1. Let me know if it worked.

 

Regards,

Rohan.

Rohan
Specialist
Specialist

Hi,

You can always create your own theme with the required colour palletes & use that theme in your dashboard.

Regards,

Rohan.

clarachac
Contributor III
Contributor III
Author

Thank you all for your answers.

I followed @steeefan's answer, and I used the colors by measure.
I created a Master Item Measure where I chose the colors that I want (cf. image)

clarachac_0-1705489761518.png