Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
s_santalucia
Not applicable

Color maps by max expression

Hi all,

I want to color maps by expression.

e.x.:

I have Italy maps and I want to color the region by num max of type car in that region;

(if num max of type car is BMW, color red!

Thanks!

1 Solution

Accepted Solutions
kaanerisen
Not applicable

Re: Color maps by max expression

Ah sorry. you should also add region field to the aggr function.

Pick(Match(FirstSortedValue(BRAND,-aggr(sum(QTY),BRAND,REGION)),'BMW','AUDI','MERCEDES'),Red(),Green(),Blue())

Untitled.png

6 Replies
kaanerisen
Not applicable

Re: Color maps by max expression

Hi Stefania,

It should be sth like that.

Pick(Match(FirstSortedValue(BRAND,-aggr(sum(QUANTITY),BRAND)),'BMW','AUDI','MERCEDES'),Red(),Green(),Blue())

BMW will be red, AUDI will be Green and MERCEDES will be Blue with this expression.

s_santalucia
Not applicable

Re: Color maps by max expression

Hi,

it doesn't work.

kaanerisen
Not applicable

Re: Color maps by max expression

Can you share the app qvf file? If you can, I will look into the problem.

kaanerisen
Not applicable

Re: Color maps by max expression

Ah sorry. you should also add region field to the aggr function.

Pick(Match(FirstSortedValue(BRAND,-aggr(sum(QTY),BRAND,REGION)),'BMW','AUDI','MERCEDES'),Red(),Green(),Blue())

Untitled.png

s_santalucia
Not applicable

Re: Color maps by max expression

yes

s_santalucia
Not applicable

Re: Color maps by max expression

IT'S OK!

Thanks!