# How to do Area calculations in Tableau [ with correction ] : New in Tableau 2021.2

> 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:** 2021-10-12
- **Format:** Video · 14 min watch · transcript available
- **Topics:** Data visualisation, Analytics
- **Tools:** Tableau (area, maps, spatial functions)
- **Canonical:** https://just-tim.com/posts/how-to-do-area-calculations-in-tableau--with-correction---new-in-tableau-20212
- **Watch:** https://www.youtube.com/watch?v=2SN4IMvNFjc

I'm uploading this video with a correction at the front. After mistakenly blaming Tableau's new AREA spatial function for inaccurate results in an earlier video, it turned out the source data from the London Environment Agency was itself wrong. I then walk through how the AREA function actually works in Tableau 2021.2 and why it only estimates area over large geographies.

## Key takeaways

- Never assume that data from a trusted source is correct, and always validate a conclusion before publishing it.
- Tableau 2021.2's AREA function calculates the area of a polygon, taking a geometry dimension and a unit ('metres', 'kilometres', 'miles' or 'feet').
- You can connect directly to shape files (.shp) in Tableau natively, and double-clicking a geometry field instantly builds a map.
- The AREA function only gives an estimate over large or curved geographies because flattening the earth's curvature introduces variance, so it's most reliable for small, simple shapes like parks and playgrounds.
- You could drive the unit argument with a parameter to switch dynamically between metres, feet, kilometres and miles.

## Chapters

- 0:00 Correction and lessons learned
- 2:54 Introducing the AREA function
- 3:15 Connecting to a spatial shape file
- 4:42 Building and customising the map
- 7:39 Writing the AREA calculation
- 8:58 Comparing accuracy against source data
- 11:41 Best use cases and caveats

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/how-to-do-area-calculations-in-tableau--with-correction---new-in-tableau-20212

---
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
