Spatial in tableau

Spatial data can be used in tableau, alteryx and power BI. Using latitude and longitude locations can be placed on a map. They can also be linked to one another in order to see paths, line, tableau also allow the ability to create buffer zones.  

The first function we can use in tableau is MakePoint(Lat, Long) this will take two fields which are your latitude and longitude and for every row create a point at these coordinates. You can also use other metrics than latitude and longitude if you add a third variable being a geo code to translate them into usable coordinates. For example for the UK, eastings and northings would use the code 27700.

MAKEPOINT([Location Easting],[Location Northing], 27700)

These points are then collected and put into a map.

Then we can use Makeline() to connect two points.

Makeline will take two points and build a line between them. The function works as Makeline(Start point, End Point). So you want to make sure you have two fields one for the start and one for the end! This is what it looks like to create lines for different flights.

In blue are destination airports and red origin airports.

Buffer(). You can use this function to create a geometrical object called a buffer. This is done by selecting the center point as the first argument, second argument is the size of the buffer and third the unit (miles, km etc). Like this buffer(point1, 7, 'km'). This will create a buffer which can be used in multiple ways. There is the ability to count the number of points within the buffer, filter to only points within the buffer etc.

This leads us to our next function: Intersect()

This function will establish is multiple geometry elements overlap. Simply put your elements of interest in this function such as Intersect(element1, element2), this will return true or false. This can be used for filtering, or colouring.

Here it was used to only keep lines which pass through one of the two buffers.

Finally, distance can also be used to calculate the distance in a straight line between two points. Such as distance(point1,point2,unit). A similar function is length() which will give you the length of a line such as length(line,unit).

There is a great Workout Wednesday to work on these functions:

#WOW2022 W13: Can you use multiple Mark Layers? – Workout Wednesday

Here is my attempt: https://public.tableau.com/app/profile/jules.claeys/viz/WOW22_13/WOW

Here is a viz I built using a lot of these functions, feel free to play with it:

https://public.tableau.com/app/profile/jules.claeys/viz/Bus_routes/Dashboard1

Author:
Jules Claeys
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab