Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Color Expression for mapping points not mapping correctly

I have about 80 points that i'm mapping.

I'm using the expression:

If (CPM<=40.0,RGB(0,254,0),(If(CPM>=100.0,RGB(254,0,0),RGB(0,0,254))))

The value of CPM for just south of Dallas is 35.4 and 35.7 (which has two readings at same geo location), each of those should map as Green, given the expression; however, it's drawn as blue (which is the default).  Is it rounding, are there issues with the mapping of color/point/function pairs?  It's working correctly on other locations.  Open to any ideas to test. - Paul

Screen Shot 2016-09-21 at 1.17.49 PM.png

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: Color Expression for mapping points not mapping correctly

Paul,
If I got you right, you have two CPM values for the same exact location.  That means CPM value here is not defined for the purpose of the color expression.
If my assumption is correct, you need to change your dimension.  Or, depending on what you need, replace CPM with avg(CPM) in your color expression.

3 Replies
rittermd
Honored Contributor

Re: Color Expression for mapping points not mapping correctly

I would break up your expression and test each piece to make sure that it is not a data issue.

Try the CPM<=40.0 and see if the 2 locations near Dallas are green or blue.

Then go from there.

mov
Esteemed Contributor III

Re: Color Expression for mapping points not mapping correctly

Paul,
If I got you right, you have two CPM values for the same exact location.  That means CPM value here is not defined for the purpose of the color expression.
If my assumption is correct, you need to change your dimension.  Or, depending on what you need, replace CPM with avg(CPM) in your color expression.

Not applicable

Re: Color Expression for mapping points not mapping correctly

Thanks, that was the problem!

Community Browser