How to Create a Map in Tableau with Zip Codes

Cody Schneider8 min read

Visualizing data on a map can reveal geographic trends you’d never spot in a spreadsheet. If you have location data with zip codes, Tableau makes it surprisingly easy to plot it and unlock those spatial insights. In this tutorial, you'll learn exactly how to prepare your data and create interactive zip code maps in Tableau, step-by-step.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Why Use Zip Codes for Mapping in Tableau?

While mapping by state or country gives you a high-level view, using zip codes offers much more granular detail. It’s perfect for answering specific business questions like:

  • Which urban neighborhoods have the highest concentration of customers?
  • Where are our sales weakest, and where should we focus our marketing efforts?
  • What are the boundaries of our different sales or service territories?

Mapping by zip code lets you see patterns within cities and across regions, helping you make more precise, location-based decisions.

Preparing Your Data for Tableau Maps

Before you even open Tableau, spending two minutes getting your data ready will save you a lot of headaches later. If your map isn't working correctly, issues in your source file are almost always the cause.

1. Format Zip Codes as Text (String), Not Numbers

This is the most common mistake. Many spreadsheet programs automatically format zip codes as numbers, which strips any leading zeros. A zip code like "07666" in New Jersey becomes "7666," which Tableau won't recognize. To prevent this, make sure your zip code column is formatted as Plain Text in Google Sheets or Text in Excel before you import the data.

If you've already loaded your data into Tableau, you can fix it there. In the Data Source tab or in the Data pane on a worksheet, find your Zip Code field, click the data type icon (#), and change it to String.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

2. Use Clear and Unambiguous Column Headers

Tableau is smart enough to often recognize field names like "Zip Code" or "Postal Code" and automatically assign a geographic role. Using clear headers helps this process work smoothly.

3. Include State and Country Fields for Accuracy

Many zip codes are duplicated across a single country, let alone the world. To avoid confusion, your dataset should ideally have separate columns for Country, State, and Zip Code.

Here’s an example of a well-formatted data structure:

Step-by-Step: Creating a Map with Zip Codes in Tableau

Once your data is clean and connected, you’re just a few clicks away from a map. Let's build one using a sample sales dataset.

Step 1: Assign the Geographic Role

In the Data pane on the left, find your zip code field. If it doesn't have a globe icon next to it, Tableau hasn’t recognized it as a geographic field yet. To fix this, right-click on the field and select Geographic Role > ZIP Code/Postcode. Tableau will now know to treat this field as map data.

Step 2: Build the Basic Map

This is the fun part. Simply double-click your Zip Code field. Tableau will automatically generate Latitude and Longitude coordinates, place them on the Rows and Columns shelves, and plot a point on the map for each unique zip code found in your data. You now have a basic symbol map!

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 3: Add Your Data to the Map

A map of dots is a good first step, but it doesn't tell a story. To make it insightful, we need to use our other data measures to control the color and size of those dots.

Visualize with Color

Drag a measure, like Sales, from the Data pane and drop it onto the Color tile in the Marks card. Tableau will instantly change the map into a gradient color map (a choropleth). By default, areas with lower sales will be a lighter shade, and areas with higher sales will be darker, giving you a quick visual summary of top-performing regions.

Visualize with Size

You can also use size to represent a measure. Drag a measure like Profit onto the Size tile in the Marks card. Now, the dots in more profitable zip codes will appear larger than those in less profitable zip codes. This is incredibly useful for spotting profitable hotspots at a glance. You can even use both! For example, you could have color represent sales volume and size represent profit margin. This allows you to encode two different measures onto your map simultaneously.

Creating your Tableau Map for Better Insights

With the basics down, you can fine-tune your map's appearance to make it more intuitive and professional.

Editing Colors

Don't like the default blue? Click on the Color tile in the Marks card, then select Edit Colors. From here, you can choose from dozens of color palettes, including brand-friendly colors, sequential palettes for continuous data (like sales), or diverging palettes (like Red-Amber-Green) that are perfect for showing positive and negative values like profit.

Adding Powerful Tooltips

The tooltip is the little information box that appears when you hover over a data point. By default, it will show the data already on the map, but you can add more context.

Drag any field you want from the Data pane directly onto the Tooltip tile on the Marks card. For example, you could add fields for "Number of Customers," "Average Order Value," and "Product Category." Now, when you hover over a zip code, you'll see a detailed snapshot without cluttering the map itself.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Troubleshooting Common Tableau Zip Code Mapping Issues

Even with perfect preparation, you can sometimes run into snags. Here are the solutions to the most common problems.

Problem: Tableau Shows an "Unknown Locations" Warning

You'll sometimes see a small gray indicator in the bottom-right corner of your map that says something like "# unknown". This means Tableau couldn't plot some of your zip codes.

  • The Cause: This is almost always due to ambiguous data. The zip code "75001" could be in France or the United States. Without more information (like a country field), Tableau doesn't know where to plot it.
  • The Fix: The best fix is to add more geographic detail. Drag your State and/or Country field onto the Detail tile in the Marks card. This gives Tableau the context it needs to correctly identify the location. If that doesn't work, you can click on the "unknown" indicator, select Edit Locations, and manually match the unrecognized zip codes to their correct location.

Problem: The Map Is Centered Off-Screen or is Blank

You followed the steps, but all you see is a corner of an ocean, or the map area is completely gray.

  • The Cause: This often happens with data from a single country where Tableau's default map view is global. It can also be caused by incorrect data formats.
  • The Fix: First, double-check that your Zip Code field has the globe icon next to it and is set as a string. Next, try adding a filter. Drag your Country field to the Filters shelf and select only the country that your data corresponds to. This will force the map to zoom in on the correct area.

Problem: The Map Type Isn’t What I Want (Filled Map vs. Symbol Map)

Tableau defaults to showing zip codes as points (a symbol map). Many people want to see the geographic boundaries of the zip code filled in with color (a filled map).

  • The Cause: Tableau needs specific boundary data (polygons) to create true filled maps. While it has this built-in for states and counties, it doesn’t for most zip codes.
  • The Fix: Under the Marks card, click the dropdown that says "Automatic" and change it to Filled Map. Tableau will do its best to create a filled map based on the geographic center it has for each zip. A more effective approach is to change the Mark type to Density. This creates a heat map, which is often a better visual representation for finding high-concentration "hotspots" without needing exact boundaries.

Final Thoughts

Creating maps in Tableau by zip code is a fantastic way to transform lists of addresses and numbers into clear, actionable insights. By carefully preparing your data, assigning the correct geographic roles, and using color and size to represent your key metrics, you can tell powerful stories about your business's geographic footprint.

While mastering Tableau is a valuable skill for deep analysis, we found that many teams spend most of their time manually building the same reports week after week. At Graphed, we created a way to skip the setup and get directly to the answers. You simply connect your data sources - like Shopify, Google Analytics, or Salesforce - and ask a question in plain English. For example, asking "Show me a map of sales per zip code for last quarter" instantly generates an interactive, real-time map, so you can focus on making decisions, not on configuring dashboards.

Related Articles