Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
christophebrock
Creator
Creator

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
christophebrock
Creator
Creator
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
christophebrock
Creator
Creator
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

christophebrock
Creator
Creator
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

christophebrock
Creator
Creator
Author

Example attached (non-working)

christophebrock
Creator
Creator
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

jsanchezmayoral
Contributor III
Contributor III

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?

plu
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.