Skip to content
Tutorials Center
My learning

Topics

Lesson 11 of 35 ยท Building Views

Maps in Tableau: Symbol Maps, Filled Maps and Dual-Axis Maps

Create maps in Tableau: assign geographic roles, build symbol and filled maps, fix unknown locations, layer a dual-axis map, use MAKEPOINT and DISTANCE, and style the base map.

Maps are one of Tableau's strongest features. As soon as a field has a geographic role (Country, State, City, Postal Code and more), Tableau knows where it is and creates two hidden measures, Latitude (generated) and Longitude (generated). Double-click a geographic field and a map appears.

Maps cannot run in this page, so the lesson gives the steps and then stand-ins for the data side: how locations are matched, how a dual-axis map combines two measures, and how Tableau's DISTANCE calculation works.

Geographic roles

A field gets a globe icon when Tableau recognizes its role. Built-in roles include Country/Region, State/Province, County, City, Postal Code, Airport, Area Code, CBSA/MSA and congressional district. You can also set one yourself: right-click the field > Geographic Role > choose a role.

  • A text field named State usually gets the role automatically; if values are abbreviations like CA or full names like California, both usually work.
  • A number can have a geographic role too (a US ZIP code). Convert IDs to strings first if you lose leading zeros.
  • If a column is wrong (for example Georgia could be the US state or the country), set a parent role such as Country to disambiguate, or add Country to the view.

Unknown and ambiguous locations

When Tableau cannot place a value, an indicator appears at the bottom right of the map ("3 unknown"). Click it and choose Edit Locations... to map each unknown value to a known place, or Filter Data to hide them. Typical causes: misspelled names, abbreviations Tableau does not know, or a value that exists in several countries.

Python Stand-in: matching values to a location list

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Tableau's real matching is far larger and handles many aliases, but the logic is the same: it looks the value up in its location database and reports what it could not find. Fix typos at the source when you can.

Symbol maps and filled maps

Symbol map (also called proportional symbol map): a mark at each location.

  1. Double-click State (a globe icon). A map with one mark per state appears, with Latitude and Longitude on the shelves.
  2. Drag SUM(Sales) to Size so circles scale with the value.
  3. Drag SUM(Profit) to Color and use a diverging palette centered on 0.

Filled map: shapes (polygons) colored by value.

  1. Double-click State, then choose Filled Map in Show Me or set the mark type to Map.
  2. Drag SUM(Sales) to Color.
  3. Open Color > Edit Colors to choose a sequential palette, and set Stepped Color for classes.

When to pick which: use a filled map for rates and densities (percentages, per-capita numbers), where area has no direct meaning. Use symbols for counts and totals, since big regions get big colors on a filled map even when their totals are not larger. Choropleth maps can mislead when areas differ greatly, so normalize your measure (sales per customer, not total sales) when you color shapes.

Map layers and styles

Map > Map Layers controls the base map: street names, borders, coastlines, land cover, population density and more. Map > Background Maps switches between Tableau's styles (Light, Normal, Dark, Streets, Outdoors, Satellite where available). Light or dark styles keep attention on your marks, and Map > Map Options lets you disable panning, zooming and the search box when a dashboard should stay fixed.

Dual-axis map

A dual-axis map layers two map views to combine a filled shape and a symbol, or two symbol types, in one picture.

  1. Build a filled map with SUM(Sales) on Color.
  2. Drag Longitude (or Latitude) copy to the Columns shelf again (hold Ctrl and drag the pill) so there are two.
  3. Right-click the second pill and choose Dual Axis.
  4. On the Marks card there are now two tabs, one per pane. In the second pane change the mark type to Circle and put AVG(Profit Ratio) on Size.
  5. Right-click one axis > Synchronize Axis if asked; hide both axes (uncheck Show Header).

The result: states are shaded by sales and circles on top show profit ratio.

SQL Stand-in: the two layers of a dual-axis map

Press Run (or Ctrl + Enter) to see the result here.

Use SUM(profit) / SUM(sales) (a ratio of sums), not AVG of per-row ratios, to get a profit ratio that does not give small orders equal weight. The same warning returns in Calculated fields and functions.

Points, lines and distances

When you have latitude and longitude columns, Tableau can use them directly: drag Longitude to Columns and Latitude to Rows, change the dimension level (put Store ID on Detail) and each store becomes a mark. Both fields need the role Longitude / Latitude, or must be numeric with the geographic role set.

Spatial functions work with MAKEPOINT(lat, lon):

TEXT
MAKEPOINT([Latitude], [Longitude])
DISTANCE(MAKEPOINT([Lat1],[Lon1]), MAKEPOINT([Lat2],[Lon2]), 'km')
MAKELINE([Origin point], [Destination point])

MAKELINE draws lines between two points, useful for routes and flows. DISTANCE returns the great-circle distance in 'km', 'miles', 'meters' or 'feet'.

Python Stand-in: great-circle distance (haversine)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Tableau's result may differ by a small amount because it uses its own Earth model; the idea (distance along the curved surface) is the same.

Custom geocoding and spatial files

  • Custom geocoding: for places Tableau does not know (stores, sales territories, internal codes), import a CSV with Latitude and Longitude columns via Map > Geocoding > Import Custom Geocoding.... Your values then get a custom role.
  • Spatial files: connect to a Shapefile, GeoJSON or KML and Tableau creates a Geometry field. Drag it to the canvas to draw polygons. A spatial join (Join on Intersects) links points to polygons, for example assigning each customer to a sales territory.
  • Density marks: for lots of overlapping points, set the mark type to Density to get a heat-style layer.

Common mistakes

  • Coloring filled maps by raw totals, so big areas dominate. Use rates.
  • Ignoring the unknown indicator. The missing marks may be your biggest customers.
  • Cluttering dashboards with a busy base map. Pick a light style.
  • Calling a country-less city field "City" and getting the wrong Springfield.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which two fields does Tableau generate when a field has a geographic role?

    Tableau creates hidden Latitude and Longitude measures from the role, which place the marks on the map.
  2. 2. When is a filled map a poor choice?

    Area dominates perception, so colored totals suggest large regions are more important; normalize or use symbols.
  3. 3. How do you build a dual-axis map?

    Two copies of the Longitude (or Latitude) pill make two panes that you can combine, each with its own mark type.
  4. 4. What does the 'unknown' indicator on a map mean?

    It lists locations Tableau could not match. You can map them manually or filter them out.

Summary

  • Geographic roles let Tableau generate Latitude and Longitude and draw symbol or filled maps.
  • Fix unknown locations with Edit Locations or by cleaning the source.
  • Filled maps suit rates; symbol maps suit counts and totals.
  • A dual-axis map layers a shape and a symbol; MAKEPOINT, MAKELINE and DISTANCE support point and route analysis.
  • Custom geocoding and spatial files cover places Tableau does not know.

Next: Dual-axis, crosstabs and special charts