Create a Heat Map of Polygons

Edit the Fill Color expression in the Polygon Properties section

A heat map can be configured by editing the expression for the “Fill Color” expression in the “Polygon Properties” section. This expression must return a text value representing a color in hex format. For example:

='#1C4B1B'

It is also permissible to use the built-in QlikView color functions in this field:

=Red()
=Green()
=RGB(17,75,93)
=HSL(251,.4,.65)

If want to create a heat map, you can follow the directions in the template that is shown by default in the expression editor for the “Fill Color” field in the “Polygon Properties” section.

This example generated using the aforementioned template creates a heat map with a green gradient broken down by “Zip” and colored by “Sales” decile:

= 	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.1), '#F7FCC5',
	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.2), '#DEE8B2',
	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.3), '#C6D49F',
	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.4), '#AEC18C',
	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.5), '#95AD79',
	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.6), '#7D9966',
	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.7), '#658653',
	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.8), '#4C7240',
	if(aggr(Sum(Receipts),Zip) <= fractile(TOTAL aggr(Sum(Sales),Zip), 0.9), '#345E2D',
	'#1C4B1B')))))))))

Deciles

In the above example, we use QlikView’s function to create deciles. A definition of decile can be found here: http://decile.askdefine.com.

Colors

The above example creates a heat map with a green gradient. In order to use a different gradient (or any arbitrary grouping of colors), the tools found at http://www.colorhexa.com may be helpful.