Yes! Yes! Yes! I could type that many more times, but I’ll get to the point. Tableau 9.0 has two new formulas that enable hexbin support!

**HEXBINX(x,y)**

** HEXBINY(x,y)**

Now the thing is that these formulas have a unit length of “1” so you will have to scale them yourselves. So for instance this is what a basic map of the SE USA looks like w/o scaling.

Although I can’t put latitudes on a Tableau Map, it generally appears that the length of 1 roughly corresponds to one latitude and longitude. If you need Here is the formula to scale the value up x10 , do the hexbin magic, and scale back down. First I created two different ZoomLvl parameters for you to use to adjust the number of hexbins. One for X and one for Y. This will give you the ability to change the # of hexbins in either direction. This could be useful.

HEXBINY([LONGITUD]*[ZoomLvl_Y],[LATITUDE]*[ZoomLvl_Y])/[ZoomLvl_Y]

HEXBINX([LONGITUD]*[ZoomLvl_X],[LATITUDE]*[ZoomLvl_X])/[ZoomLvl_X]

Now you can see that there is a much higher hexagon resolution. It’s a heatmap of Accidents. I will be posting a completed workbook later.

**Of special note is this**: if you are going to try to save steps and copy the field (say latitude) and replace the formula with the other one then rename it “longitude” then Tableau will keep the measure’s geographic role assigned to “latitude”. Change this to longitude!

Now here is an example of how HEXBINS can help with an ordinary scatterplot. This data below was generated from these two functions. This formula would work in Tableau, however since the random() function in Tableau has a fixed seed, it will not generate different random data for two columns. Stringing multiple randoms together makes a pseudo normal distribution.

x = iif(random()>.5,(random()+random()+random()+random()+random()+random()+random()+random()-3)/16 ,(random()+random()+random()+random()+random()+random()+random()+random()+3)/16 )

y = iif(random()>.5,(random()+random()+random()+random()+random()+random()+random()+random()-3)/16 ,(random()+random()+random()+random()+random()+random()+random()+random()+3)/16 )

You should get a cool pic like this:

Now even with small sizes, and 75% transparency, you will notice some of the points are obscured by the amount of data. Hexbinning can solve this by bucketizing the data. Here are the hexbin formulas I used:

HexbinX([F1]*[ZoomLvl_X],[F2]*[ZoomLvl_X])/[ZoomLvl_X]

HexbinY([F1]*[ZoomLvl_Y],[F2]*[ZoomLvl_Y])/[ZoomLvl_Y]

and placing the above formulas will give you a nice simple mapping like this:

Now you can clearly see the center.

Three things will help you in doing Hexbins in Tableau. They are all custom shapes. The first one is a hollow hexagon with a thicker border. The second has a thin border. And the third shows a filled hex.

#### Update 3/5/2015:

I have decided to add in 6 hexagons so you can choose the level of fill that you need.