Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Map color code by expression not working (anymore)

Hello,

Since the upgrade of the new qliksense version, it seems like the colorcoding by expression doesn't work anymore.

Even an expression as simple as:

=if(1=1,rgb(0,0,0),rgb(100,0,0))

Doesn't do anything.

I even tried:

=rgb(0,0,0) as the sole thing in my expression, the on the map remain grey...

Anyone else experiencing this issue? And if so, how can it be fixed?

(or is it a bug?)

Kind regards,

Christophe

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Ok, problem resolved!

The issue is the following:


While the qlik documentation says this should work:

if(Sum([Sales]) < 10000, 'red', green())

It doesn't

Even the color functions need to be written between single quotes.

So this is how DOES work:

if(Sum([Sales]) < 10000, 'red', 'green()')


I just spent 4 hours looking for this... Probably this needs to be rectified in the documentation or in the programming of the tool.

Kind regards,

Christophe

View solution in original post

6 Replies
Anonymous
Not applicable
Author

Meanwhile, I re-created a map in my upgraded qliksense desktop, and the ability to color code points on a map disappeared entirely?

Schermafbeelding 2017-07-07 om 10.28.25.png

Anonymous
Not applicable
Author

Ok, in the meantime I found the "Appearance" tab was hidden behind the bottom grey bar so I was able to expand it by clicking on the one pixel which appeared above it...

However, the issue persists... -- no matter what I fill in in the expression, the colors remain grey:

test.jpg

Anonymous
Not applicable
Author

Example attached (non-working)

Anonymous
Not applicable
Author

Ok, problem resolved!

The issue is the following:


While the qlik documentation says this should work:

if(Sum([Sales]) < 10000, 'red', green())

It doesn't

Even the color functions need to be written between single quotes.

So this is how DOES work:

if(Sum([Sales]) < 10000, 'red', 'green()')


I just spent 4 hours looking for this... Probably this needs to be rectified in the documentation or in the programming of the tool.

Kind regards,

Christophe

Anonymous
Not applicable
Author

Hi,

I've tried your solution but it did not work for me.

My expression is:

ColorMix2(Avg(Avance)*2/100-1,'red','green','yellow')

And the map remains in grey.

In the previous version it actually worked, but, as you said, not anymore.

Any clue?

Patrik_Lundblad
Employee
Employee

Hi Christophe,

This is a bug in the June 2017 release.

It has been fixed and will be part of the first patch and then you won't need the single quotes.

Best regards,

Patrik.