# How to use the Makeline function in Tableau Desktop 2019.2 and newer

> 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-01-10
- **Format:** Video · 5 min watch · transcript available
- **Topics:** Data visualisation
- **Tools:** Tableau (calculated fields, makeline, maps, parameters)
- **Canonical:** https://just-tim.com/posts/how-to-use-the-makeline-function-in-tableau-desktop-2019-2-and-newer
- **Watch:** https://www.youtu.be/fAxVy3TZC-o

Following on from my video on making points in Tableau 2019.2, I show you how to use the MAKELINE spatial function to draw lines between a start and end point. I demonstrate it with taxi journey data and explain how the function honours the curvature of the earth when plotting longer routes like flight paths.

## Key takeaways

- MAKELINE() takes just two arguments, a start point and an end point separated by a comma, to draw a line between them
- With very large data sets you should narrow your data down first, as drawing millions of lines while generating points twice per record is extremely demanding on Tableau
- Use the new 2019.2 map layers, such as streets and terrain, to add context so journeys are easier to interpret
- MAKELINE respects the curvature of the earth, so long routes like flights bend to reflect the true shortest path rather than a straight line on a flat projection
- Combining MAKELINE with parameter actions lets you change the origin point dynamically and replot lines to all destinations

## Chapters

- 0:00 Creating the MAKELINE calculation
- 1:13 Narrowing down a large data set
- 1:54 Plotting lines and adding map layers
- 2:42 Curvature of the earth and flight routes
- 3:22 Parameter action example by Marc Reid

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/how-to-use-the-makeline-function-in-tableau-desktop-2019-2-and-newer

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