How to Use Longitude and Latitude in Tableau

Cody Schneider8 min read

Mapping your data in Tableau is one of its most powerful and visually appealing features, but getting your location dots in just the right spot can sometimes feel tricky. While Tableau is smart enough to map common locations like countries and cities automatically, true mapping precision comes from using specific longitude and latitude coordinates. This article will walk you through exactly how to harness your own coordinate data to build precise, custom maps in Tableau.

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

Understanding How Tableau Sees Geographic Data

Before diving into your custom coordinates, it's helpful to understand Tableau's built-in mapping capabilities. Tableau contains a rich set of geographic data, allowing it to automatically identify and map common location types.

Generated Latitude and Longitude

When you load a dataset that includes fields like "Country," "State," "City," or "Zip Code," Tableau often recognizes them automatically. It assigns them a 'geographic role,' symbolized by a small globe icon next to the field name in the Data pane.

When you use one of these fields in a view, Tableau generates two special fields: Latitude (generated) and Longitude (generated). It places these on the Rows and Columns shelves for you, creating a map without any extra work.

For example, if you have a list of customer sales by state:

  1. Drag the "State" dimension onto your canvas.
  2. Tableau automatically creates a map, placing a mark at the center of each state in your data.
  3. You can then drag a measure like "Sales" onto the Color or Size marks card to visualize performance.

This auto-generation is fantastic for high-level views, but its accuracy depends on Tableau's internal database. If you're plotting something hyper-specific, like individual store locations, oil rigs in the ocean, or service call addresses, you'll need to provide your own coordinates.

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.

Using Your Custom Longitude and Latitude Coordinates

Using your own coordinate data gives you full control over exactly where each point appears on the map. This is essential for any analysis that requires more precision than just a city or state center. Here is the step-by-step process to get it done.

Step 1: Get Your Data Ready

First, make sure your data source (like an Excel or CSV file) is set up correctly. This is the most important step, as Tableau needs a clean structure to work with.

  • Separate Columns: You must have two separate columns in your dataset - one for latitude and one for longitude.
  • Numeric Data Type: Ensure the values in these columns are formatted as numbers (e.g., Number or Decimal). Latitude values for Earth range from -90 to +90, and longitude values range from -180 to +180. Check for any text, commas, or special characters that might cause import errors.
  • A Unique Identifier: Have a column that uniquely identifies what each coordinate pair represents, such as "Store ID," "Customer Name," or "Sensor Location." This will be crucial for adding detail to your map later.

A basic, well-formatted dataset might look like this:

Store Name, City, State, Latitude, Longitude, Sales Main Street Coffee, Austin, TX, 30.2672, -97.7431, 55000 Downtown Roasters, Dallas, TX, 32.7767, -96.7970, 72000 Coastal Brews, Houston, TX, 29.7604, -95.3698, 48000

Step 2: Assign the Correct Geographic Roles

Once you've connected your data source to Tableau, you need to tell Tableau which columns contain your coordinates.

  1. In the Data pane on the left, find your latitude field. You’ll notice it likely has a "#" icon, indicating a numeric measure.
  2. Right-click on your latitude field.
  3. Go to Geographic Role and select Latitude. The icon should change to a small globe.
  4. Repeat the process for your longitude field. Right-click on it, go to Geographic Role, and select Longitude.

This conversion primes Tableau to use your specific values for mapping instead of trying to generate them itself.

Step 3: Build the Basic Map View

Now you're ready to create the map. This is a very specific sequence of drags and drops.

  • Drag your Longitude field from the Data pane onto the Columns shelf.
  • Drag your Latitude field onto the Rows shelf.

Following this order - Longitude to Columns, Latitude to Rows - creates a background map of the world. At this point, you'll probably see just one dot on the map, likely in the United States or near West Africa if you have global data. Don't panic! This is expected behavior.

Tableau defaults to aggregating measures. Because your Longitude and Latitude fields are continuous measures (green pills), Tableau is currently showing you the average of all your latitude and longitude values - a single, meaningless point. Your next step is to break that single point into all of your individual data points.

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 4: Display Every Data Point

To see a mark for each location in your dataset instead of just the average, you need to bring in a dimension to tell Tableau how to disaggregate the view.

  1. Find the unique identifier field you prepared in Step 1 (e.g., "Store Name").
  2. Drag this dimension and drop it onto the Detail card within the Marks card.

Instantly, the single dot will explode into multiple points - one for each unique store name in your dataset. You now have a custom map with every location plotted accurately!

An alternative method, more suitable for certain analyses, is to go to the main menu, click Analysis, and uncheck Aggregate Measures. This tells Tableau to plot a mark for every single row in your data source. This is powerful but can be performance-intensive with very large datasets.

Making Your Custom Map Meaningful

A map of dots is a great start, but the real value comes from adding layers of information to it. You can do this easily using the Marks card.

Use Size and Color to Show Performance

Visualizing a measure is simple. Do you want to see which stores have the highest sales?

  • Drag your "Sales" measure onto the Size card. The dots on your map will automatically resize, with larger dots representing higher sales.
  • Alternatively, drag "Sales" onto the Color card. Tableau will apply a color gradient, making it easy to spot high- and low-performing locations at a glance.

Use Color to Differentiate Categories

What if you want to classify your points by a category, not a measure?

  • Drag a dimension, like "Store Type" or "Product Category," onto the Color card. Tableau will assign a unique color to each category, turning your map into a clear segmentation tool.

Customize Your Tooltips

Tooltips are the pop-up boxes that appear when you hover over a data point. They're essential for providing context without cluttering the map.

  • By default, the tooltip shows the fields already used in the view.
  • To add more information, simply drag other fields (like "City," "Manager Name," or specific sales figures) onto the Tooltip card.
  • You can even click the Tooltip card to open an editor and customize the text, layout, and formatting for a clean, professional look.

Troubleshooting Common Map Issues

Creating maps can sometimes lead to unexpected results. Here are a few common problems and how to solve them.

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.

Problem: All My Points Appear at Latitude 0, Longitude 0

If you see a single point or a group of points clustered off the coast of Africa, you're looking at "Null Island." This spot marks the location of (0,0) coordinates. It usually means Tableau is having trouble reading your coordinate fields. Solution:

  • Check your raw data. Look for rows where the latitude or longitude values are null, blank, or contain text. Clean these up in your original file and refresh the data source in Tableau.
  • Verify that you have assigned the geographic roles correctly (Latitude to latitude, Longitude to longitude).

Problem: Tableau Says There Are "Unknown" Locations

In the bottom-right corner of the map, you might see a small gray indicator that says "# unknown." Click on this to see a list of locations Tableau couldn't plot. Solution:

  • This happens most often with generated coordinates when a city name is ambiguous (e.g., Paris, Texas vs. Paris, France). With custom coordinates, this usually points to data quality issues like the ones described above. Check for typos or invalid numeric entries in your coordinate columns.

Problem: My Map Looks Stretched or Squashed

This is an easy fix! It almost always means you've accidentally mixed up your axes. The visual effect is sometimes subtle but can be very disorienting. Solution:

  • Ensure that your Longitude field is on the Columns shelf and your Latitude field is on the Rows shelf. If they're reversed, just drag and drop them to their correct places.

Final Thoughts

Moving beyond Tableau’s auto-generated maps by using your own longitude and latitude data unlocks an incredible level of analytical precision. It allows you to transform a standard spreadsheet into a rich, interactive visual story, showing patterns and insights that a simple bar chart or table could never reveal.

Mastering tools like Tableau is a fantastic way to level up your data skills, but we know that even with the right skills, the full process of connecting data, cleaning it, and manually building visuals can still be a major time sink. At Graphed, we use conversational AI to automate that entire workflow. Instead of manually assigning roles and dragging pills, you simply ask for what you need - like, "Create a map showing our customer locations in California, sized by total order value" - and our AI analyst builds the interactive dashboard for you in seconds. It allows you to stay focused on the insights, not the setup.

Related Articles