Spatial Joins
in Tableau
Learn how to combine geographic data by linking spatial files through location-based relationships: containment, intersection, and proximity.
What Is a Spatial Join?
A spatial join is a method of combining two datasets based on the geographic relationship between their features, rather than matching on a shared column like a regular join. Instead of asking "Do these rows share the same ID?", a spatial join asks: "Do these shapes overlap, touch, or contain each other on a map?"
Understanding Spatial Files
Three Core Geometry Types
Every spatial file stores one of these geometry types. When performing a spatial join, the relationship condition you can use depends on which geometry types you are joining.
How Spatial Joins Work
Spatial Relationship Types
Spatial vs. Regular Join
| Spatial Join | Regular Join | |
|---|---|---|
| Match Condition | Geographic relationship | Shared column value |
| Requires | At least one spatial file | Common key field |
| Example | Point inside polygon | Order ID = Order ID |
| Join Types | Inner, Left, Right, Full | Inner, Left, Right, Full |
| Use Case | No common field exists | Tables share a key |
Why Spatial Joins Matter
How to Perform a Spatial Join
Example: Stores in Districts
Example: Within Distance
Example: Polygon to Polygon
Using Latitude/Longitude Data
You don't always need a spatial file for both sides of the join. If your data source contains Latitude and Longitude columns, Tableau can generate point geometry on the fly and use it in a spatial join.
Key Spatial Functions
Common Mistakes
Spatial Join Summary
| Concept | Key Detail |
|---|---|
| What it does | Joins data based on geographic overlap |
| Requires | At least one spatial file or MAKEPOINT field |
| Default condition | Intersects |
| Other conditions | Contains, Within Distance |
| Supported formats | Shapefile, GeoJSON, KML, MapInfo TAB, TopoJSON |
| Key function | MAKEPOINT(lat, lng) |
| Common pitfall | Boundary duplicates with Intersects |
Question 1 of 5
What does a spatial join use as its join condition instead of a shared column?
Question 2 of 5
You have a CSV file with Latitude and Longitude columns but no geometry field. Which Tableau function do you need to use before performing a spatial join?
Question 3 of 5
A school district wants to determine which district boundary each school falls inside. Which spatial relationship condition should they choose?
Question 4 of 5
Which of the following is NOT a spatial file format natively supported by Tableau?
Question 5 of 5
A point feature sits exactly on the boundary between two polygon features. If you use Intersects, what happens?