Menu
Stuff by Yuki
  • Home
  • Data Engineering
    • Python
  • Business Intelligence
    • Power BI
    • Tableau
  • Perspectives
  • About
  • Contact
Stuff by Yuki

How to Create a Hex Map in Power BI

Posted on April 19, 2023April 19, 2023

Hex Maps in Power BI

You’ll need to use a custom visual to create a hex map as there is no default visual for that in Power BI. In this post, we’ll use one called “Synoptic Panel” created by okviz. The creator of okviz is the same as sqlbi, which probably is the best resource for learning Power BI in general!

Creating a Hex Map with Synoptic Panel Custom Visual

The Power BI report I created is for Workout-Wednesday 2022 Week4. The dataset is this one found on data.world. There is some data transformations required, so if you’d like to do this from scratch, please refer the link I mentioned explaining the solution. Otherwise, you can download my Power BI report here with the data already transformed. You can create a new report page to follow along.

Download Synoptic Panel Visual

Click on “get more visuals” in the visual pane:

Type “synoptic” in the search bar. And Synoptic Panel by Okviz should pop up!

Make sure you click on “add”. After that you should see a new visual added in your visualization pane.

Adding Fields and Measures to the Visual

After you downloaded the visual, the only things you need to do are to:

  • Add category, measure, and states measure
  • Format colors, fonts, etc

For measures, I created “Total Population Moving” and “Rank”.

Copy Copied Use a different Browser

Total Population Moving = SUM( 'State Migration'[Population Moving] )

Copy Copied Use a different Browser

Rank = 
RANKX( 
    ALLEXCEPT('State Migration', 'State Migration'[State To]),
    [Total Population Moving],
    ,
    DESC
)

The second measure might look a little complicated if you’re not used to useing RANK() or ALLEXCEPT().

It’s basically trying to rank the data based on “Total Population Moving” where you’re considering only the filters applied to “State To” column. And that makes it possible to have users select a value in the “State To” column and still shows the correct ranking.

This Rank measure is used to conditionally format the colors of each tile in the visualization.

The conditional formatting looks like this:

And that’s it. Now you should have a hex map visual like in the following report:

Github repo

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Where I’m Headed in the Next 5 Years
  • Open-Source vs Vendor Data Tools
  • Developing the Habit of Writing
  • How to Inspect and Optimize Query Plans in Python Polars
  • Learn Python Polars with Polars Cookbook

Popular Posts

  • A Running Total Calculation with Quick Measure in Power BI
  • A Complete Guide to Git Integration in Power BI
  • How To Copy And Paste Report Page in Power BI
  • Handling Missing Values in Polars
  • How to Convert String to Date or Datetime in Polars

connect with me

  • LinkedIn
  • Twitter
  • Github
  • Website

Search Articles

©2025 Stuff by Yuki | Powered by SuperbThemes