Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Announcements

- Qlik Community
- :
- All Forums
- :
- QlikView App Dev
- :
- QlikMaps

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Showing results for

Anonymous

Not applicable

2016-07-05
01:35 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

QlikMaps

I'm trying to create a density map. See below expression. My map fills with the same shade of color. What am I doing wrong?

=if(count(DISTINCT TOTAL [State]) = 1, RGB(127,39,4),

if(Sum(TOTAL <[State]> [PERS]) <= fractile(TOTAL aggr(Sum([PERS]),[State]), 0.1), RGB(255,245,235),

if(Sum(TOTAL <[State]> [PERS]) <= fractile(TOTAL aggr(Sum([PERS]),[State]), 0.2), RGB(254,230,206),

if(Sum(TOTAL <[State]> [PERS]) <= fractile(TOTAL aggr(Sum([PERS]),[State]), 0.3), RGB(253,208,162),

if(Sum(TOTAL <[State]> [PERS]) <= fractile(TOTAL aggr(Sum([PERS]),[State]), 0.4), RGB(253,174,107),

if(Sum(TOTAL <[State]> [PERS]) <= fractile(TOTAL aggr(Sum([PERS]),[State]), 0.5), RGB(253,141,60),

if(Sum(TOTAL <[State]> [PERS) <= fractile(TOTAL aggr(Sum([PERS]),[State]), 0.6), RGB(241,105,30),

if(Sum(TOTAL <[State]> [PERS]) <= fractile(TOTAL aggr(Sum([PERS]),[State]), 0.7), RGB(216,88,15),

if(Sum(TOTAL <[State]> [PERS]) <= fractile(TOTAL aggr(Sum([PERS]),[State]),0.8), RGB(187,70,1),

if(Sum(TOTAL <[State]> [PERS]) <= fractile(TOTAL aggr(Sum([PERS]),[State]), 0.9), RGB(166,54,3),

RGB(127,39,4)))))))))))

550 Views

1 Solution

Accepted Solutions

Anonymous

Not applicable

2016-07-05
02:11 PM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Formula is correct and can be used for a heat map. My data was incorrect as I had the State abvr joined to State.

337 Views

3 Replies

Anonymous

Not applicable

2016-07-05
02:11 PM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

338 Views

trey_bayne

Partner - Creator

2016-07-11
10:14 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi mrjohn23,

My name is Trey Bayne and I work with the QlikMaps team. Another expression we have been playing with is as follows where $1 is your measure and $2 is your dimension:

pick(Ceil(rank(total sum($1))/Count(distinct TOTAL $2)*7),

rgb(41,138,3),

rgb(65,156,33),

rgb(89,174,63),

rgb(113,192,94),

rgb(138,209,124),

rgb(162,227,154),

rgb(186,245,184))

This expression is much more efficient but sacrifices some resilience to poorly constructed data. One thing that has helped is clicking on the gears next to the dimension on the map object and selecting 'Suppress Null Values'.

If you try to use this and don't get the results you are expecting, select More under Map Properties and set Map Zoom equal to 0. This will allow you to view the map as a straight table to help identify where the issue with the data might be. happymapping

337 Views

Anonymous

Not applicable

2016-07-11
10:47 AM

Author

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks, I'll give it a try.

337 Views