Spatial Union now possible
Tableau 2020.3 finally lets you union two shapefiles \u2014 here's how to overlay congressional districts and counties on one map.
- Spatial Union only works between shapefiles of the same type \u2014 you can't union a GeoJSON with a KML, for example
- All files related to a shapefile must sit in the same folder, as Tableau treats the directory like a database and each shapefile like a table
- Convert a spatial connection to a union via the dropdown arrow, then drag the second file in to get a clean union plus the usual table name column
- After mapping the geometry, drag the table name onto colour to separate the two overlaid layers visually
- You can combine this with set actions to let users switch between levels of detail, such as congressional districts and counties
Tableau 2020.3 added Spatial Union, letting you combine two shapefiles of the same type into one data source so you can visualise multiple geographic layers together on a single map.
Demonstrated using two US shapefiles — congressional districts and counties — which overlap geographically but sit at different levels of detail.
- Only union shapefiles of the same type 0:00
Spatial Union requires both files to be of a similar format — you can't union something like a GeoJSON with a KML. Check your file types match before attempting the union.
- Put all related shapefile files in one folder 1:01
For the union to work, everything related to both shapefiles must sit in the same directory — Tableau treats the folder like a database and each shapefile like a table within it. This is a hard requirement: if the second file lives elsewhere, it won't appear as an option.
- Connect to the spatial folder 1:22
Connecting to the folder behaves like connecting to a CSV directory — Tableau scans the whole folder and surfaces every shapefile found there as a separate table.
- Convert the connection to a union 2:00
Once connected to the first shapefile, use the dropdown arrow to convert it to a union, then drag the second shapefile in. This produces a clean union plus the familiar table name column used to identify which row came from which source.
- Map the geometry field 3:01
Double-clicking the geometry field plots everything in the combined dataset onto one map, but the two layers sit directly on top of each other with no visible distinction at this point.
- Separate layers using colour 3:21
Drag the table name field onto colour to visually distinguish the two overlaid geographies — you can then pan and zoom to see one layer nested inside the other, and selecting a colour highlights just that layer's shapes.
- Extend with set actions for drill-down 4:02
You can pair this union with a set action to let users switch between levels of detail — for example starting at a broad boundary level and zooming into a smaller one to see how they relate. Spatial overlap analysis is another way to understand which shapes sit inside which and feed that back into your data.
- Relationships seem to interfere with getting the union to work — keeping the files in the same folder without relationships is what makes it behave.
- The union only works cleanly when both shapefiles share the same format; mixing types isn't supported.
- The table name column that appears after the union is the standard mechanism you'd already know from unioning regular tables.
Reach for this when you need to show two related but differently-scaled geographic boundaries — like districts and sub-regions within them — on the same map, especially if you want to let users drill from one level to the other.
How this Rollup was made provenance & method
A Rollup is drafted by AI from the video's transcript, then reviewed and edited by Tim. Everything used to produce this one is listed below — the model, the exact prompt, and the source video — so the process is transparent and reproducible.
- Transcription
- On-device — NVIDIA Parakeet v3 for recent videos, OpenAI Whisper large-v3 for earlier ones. The transcript never leaves the machine or gets published.
- Drafting
- Claude Sonnet 5 in the cloud, from that transcript.
- Prompt
- The exact Rollup prompt (v2) — the full system prompt, unedited.
- Source video
- Watch on YouTube
- Drafted
- 5 July 2026 at 09:38
- Reviewed & edited
- 5 July 2026 at 09:41 · by Tim Ngwena
Model + prompt + video is everything you'd need to recreate a Rollup like this yourself. The one thing we don't share is the transcript.
Rights. The video and its transcript are the property of TN Media Ltd. Unauthorised use or download is prohibited. © TN Media Ltd.