# Spatial Union now possible

> This is content from just-tim, the data-and-analytics channel by Tim Ngwena (formerly 'Tableau Tim'). Tim has 12+ years of hands-on BI experience and covers Tableau most of all, plus Power BI, Looker, Hex, SQL and data modelling, the analytics industry, and the craft of doing the job — always tool-agnostic and honest about the trade-offs.

- **Author:** Tim Ngwena (just-tim, https://just-tim.com/about)
- **Published:** 2020-08-12
- **Format:** Video · 5 min watch · transcript available
- **Topics:** Data visualisation
- **Tools:** Tableau (maps, spatial union)
- **Canonical:** https://just-tim.com/posts/spatial-union-now-possible-in-tableau-2020-3
- **Watch:** https://www.youtu.be/0zugWa9uXsg

I walk through the new Spatial Union feature added in Tableau 2020.3, which lets you union two shapefiles of the same type. Using US congressional district and county data, I show how to set up the union and then visualise both layers on a single map.

## Key takeaways

- 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

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/spatial-union-now-possible-in-tableau-2020-3

---
just-tim — Data and analytics, with a point of view. · https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw · https://twitter.com/TableauTim · https://www.linkedin.com/in/timngwena
