# Tableau length function calculates the length of roads, gps traces, rivers & more #tableau #data

> 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:** 2023-08-16
- **Format:** Short · 1 min watch · transcript available
- **Topics:** Data visualisation
- **Tools:** Tableau (calculated fields, maps)
- **Canonical:** https://just-tim.com/posts/tableau-length-function-calculates-the-length-of-roads-gps-traces-rivers--more-tableau-data
- **Watch:** https://www.youtube.com/watch?v=gGaeaczkbNw

I show off the new spatial length function added in Tableau 23.2, which calculates the length of line geometries like rivers, roads and GPS traces. I demonstrate it on a body of water and walk through how simple the underlying calculation is.

## Key takeaways

- Tableau 23.2 introduced a spatial LENGTH function for measuring line geometries
- The function only works on line or multi-line geometry types, not polygons or points
- You pass the geometry and a distance unit such as miles, feet or kilometres
- Hovering over a feature like Dulles Brook shows the calculated length of 10.56 miles

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/tableau-length-function-calculates-the-length-of-roads-gps-traces-rivers--more-tableau-data

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