Power BI doesn't come with a hexagon map, so I built one using Deneb. Each hexagon gets a colour based on a value, sales for example, and if you hover over it you get the actual number. Power Query works out which hexagon every row belongs to, a couple of DAX measures supply the values, and Deneb does the drawing.
You do lose the street map underneath. That's the one real downside.
Which map, for which question
Power BI gives you several map visuals, and at first glance they all look a bit alike. They don't answer the same question, though.
The Map visual and Azure Maps put a bubble or a dot on every location. That's what you want if someone needs to find a particular place. Zoom out on a busy dataset, mind you, and it turns into one big smudge.
Switch on the heat map layer in Azure Maps and the dots become a glow. Nice for a first impression, but there's no number in it.
Filled map and Shape map colour whole regions – countries, postcodes, sales territories. Brilliant when those regions mean something to the business. Less so when one region is enormous and its neighbour is tiny, because the big one dominates the page whatever its value.
A hexagon map cuts the whole area into equal cells and colours each one by a value. Same size everywhere, so you're comparing like with like. This is the one Power BI doesn't have.
So when would you want one? Mostly when you've got lots of points (properties, shops, customers, incidents, that sort of thing) and the question is about areas rather than individual locations. If your regions already have a business meaning, I'd still go for a filled map. And if people need to find one building, dots are fine.
(Why hexagons rather than squares? Squares would work. Hexagons just sit more naturally on a map, partly because all six neighbours are the same distance from the centre, so you don't get that blocky, spreadsheet feel.)
I'd had a dot map in a report for a while. Then I built a prototype in Claude that happened to include a hexagon map, and it was so much easier to read that I wanted the same thing in Power BI.
What I wanted from it
Here's what the map needed to do. Having it written down helps, because some options fall over straight away.
- Show a real number when you hover, not just a shade.
- Let you compare areas fairly, so equal cells and a colour scale that copes with whatever the data looks like.
- Respond to slicers and filters like any other visual.
- Agree with the rest of the report. If a hexagon says one thing, the KPI cards shouldn't say another.
- Switch between a sum (sales value, say) and a count.
- Work in PDF and PowerPoint exports, publish to web, the mobile app and embedded reports.
Number six sounds dull. It ended up deciding more than all the others put together.
What I tried before Deneb
I started with what's built in, then went looking on AppSource.
My first go was the Azure Maps heat map layer: copy the existing Azure map, turn the Marker layer off, turn the Heat map layer on, pick a gradient. It looked rather nice, to be fair. But you can't hover and get a number, and because the glow depends on how close the points are to each other, you can't really compare two areas. So it failed on points one and two.
Shape map should have been the answer. It colours custom shapes from a TopoJSON file, so in theory you just feed it a hexagon grid. In practice it's still a preview feature, and for me it never appeared in the Visualizations pane, even with it ticked in File › Options › Preview features and on the normal Desktop rather than the Report Server version. Filled map and Map have almost identical icons, which didn't help. If it works for you, give it a go.
On AppSource, Hexbin Scatterplot by David Eldersveld sounds perfect from the name. It only counts points per hexagon, though, and I needed to sum a value – plus it's a scatter chart on X and Y axes, not a map. Icon Map Pro from Tekantis supports H3 hexagon layers and could probably have done the job, but it isn't certified, may need a paid plan, and both your Power BI admin and any app the report is embedded in would have to allow it.
Which left Deneb ("Deneb: Declarative Visualization in Power BI", by Daniel Marsh-Patrick). It's free, open source and certified. Rather than giving you a set of chart types, it draws whatever you describe in a Vega-Lite specification, Vega-Lite being a fairly well-known JSON language for charts.
The certified bit matters more than people tend to think. Certified visuals have been through Microsoft's checks and keep working in exports, publish to web, the mobile app and embedded reports. So point six was sorted. Everything else came down to how the specification was written.
Small thing: when I searched AppSource for "Deneb" I got nothing. "Declarative" or "Vega" found it.
How it works
The idea itself is simple. You define the hexagons once, tag every row of data with the ID of the hexagon it falls in, and let Deneb match the two up and colour them in.
The first decision is how big the hexagons should be, and that's as much a business call as a technical one. Too big and different neighbourhoods end up in the same cell. Too small and lots of cells hold one or two records, which doesn't tell anyone much. I tried half and double before going with roughly 1 km², about the size of a city neighbourhood. I'd try a couple of sizes and show them to someone who knows the business.
The grid – every hexagon with its own ID, plus the area outlines – lives inside the Deneb specification. No map service, nothing extra to publish. Claude Code wrote a small script that generates the grid and the specification, so changing the hexagon size later just means running it again.
On the data side, a custom column in Power Query works out each row's hexagon from its latitude and longitude. What really matters is that it uses exactly the same maths as the grid. If the two are even slightly different, the IDs won't match and the map stays empty. And because it's a Power Query step, it's calculated once at refresh rather than every time someone clicks a slicer. (If you're curious about the maths, Red Blob Games' guide to hexagonal grids explains it really well.)
Deneb then gets a small table of Hex IDs and values from Power BI, matches each one to its hexagon and colours it. The rest of the grid stays light grey, so you can always see the shape of the area, with the outlines on top. Since the data comes from Power BI like any other visual, slicers and filters just work.
Getting the numbers right
If the map and the KPI cards disagree, people stop trusting both. It's tempting to just sum the rows behind the map – my old dot map did exactly that – but if your data has been merged from more than one source, some rows can repeat and get counted twice. When I checked, that's what had happened. So the hexagons use the same formulas as the rest of the report.
Switching between a sum and a count was the other thing. In Power BI you'd normally reach for a field parameter, but a field parameter changes the field's name when you switch, and Deneb looks fields up by name. Switch once and the map loses its data. The way round it is an old-fashioned disconnected table with the two options, and one measure whose name never changes:
Hex Value = SWITCH([Hex Metric Name], "Transactions", [Hex # Transactions], [Hex $ Volume])
If "Transactions" is selected it returns the count, otherwise the sum. A button slicer on the table lets users switch, and Deneb always finds Hex Value.
Making it readable
Getting the map to draw was quick. Making it readable took much longer, mostly because of the colour scale. I went through three:
- Linear didn't work. With skewed data, a handful of hexagons take the dark colours and the rest of the map is more or less the same pale blue.
- Log was meant to fix that by squashing the big values, but it's very sensitive at the low end. One oddly small value was enough to make almost everything look dark.
- Quantile is what I kept. It splits the hexagons into five equal-sized groups, so each shade covers a fifth of the map, recalculated whenever the filters change.
With quantiles the colours show rank rather than size, which is worth explaining to anyone non-technical. A dark hexagon is in the top fifth – it could be twice the next one or fifty times. That's why the hover number matters so much.
The rest was smaller stuff. Thin white gaps between hexagons so similar neighbours don't blur into blobs, grey outlines that stay in the background, and empty hexagons in plain grey with no tooltip. The legend I built inside the specification, because Deneb doesn't come with a stepped legend showing value ranges.
What users get, and what they don't
Compared with the heat map, users can now hover and see an actual number, compare areas fairly, filter the map like anything else on the page, and trust that the totals match the KPI cards. They can switch between sum and count with one click, and the map still works in exports and embedded reports.
The one thing they lose is the street map. If someone needs to find a particular building, the hex map won't help, so I'd keep an ordinary map on a second view (bookmarks are handy for that). The hexagons are for the bigger picture.
Looking back
If I had to boil it down: make sure the grid and the Hex ID use exactly the same maths, choose the colour scale with your data in mind (quantiles worked best for me), keep field names fixed when you're using Deneb, and check the data before you trust what the map tells you.
It took longer than dropping in something from AppSource. But I understand every part of this map now, it goes wherever the report goes, and if I ever want different-sized hexagons, I just rerun the script.