top of page

INTERSECTS () Spatial Function in Tableau

Writer's picture: Bernard KilonzoBernard Kilonzo
intersects function in Tableau

Introduction

Introduced in Tableau 2022.4, this function allows you to determine if two spatial objects overlap.

The Syntax

INTERSECTS (<geometry1>, <geometry2>) – Which returns a Boolean (True/False) indicating if two spatial objects overlap.

Note, this function is supported for the following combinations.

  • Point/polygon

  • Line/polygon

  • Polygon/polygon

In this short article, I am going to demonstrate how you can use the INTERSECTS functions to determine overlapping spatial objects.

To demonstrate this, I will be using this sample data on ‘Health Facilities in Kibera’.

Therefore, I have plotted the facilities as shown in the map below.

sample point map in tableau

Let’s say from this map, you would like to find out how many health facilities overlap a certain point on the map – it could be a school, area administrative office, or anything else.

You can do that by first creating a Buffer around that point. In this case, I am interested in a school which is at this geocodes (-1.31135,36.78935).

Therefore, I will create a buffer around this school using the following calculation.

creating a buffer calculation in tableau

(This calculation returns a 1,000 feet boundary around this imaginary school)

Drag the buffer calculation to the view (drag it to the marks layer) to show the 1,000 feet boundary around the school.

point map

Create an INTERSECTS calculation using the health facilities points and the buffer calculation as shown below.

creating an intersect calculation in tableau

Add this calculation to the color shelf.

point map

Add parameters to empower users dynamically adjust the number and units used to compute the buffer around your point of interest.

point map

Note you can count the number of health facilities overlapping this point using the calculation below.

counting the number of facilities overlap a spatial object in tableau

As well as compute the percent of the total facilities using the calculation below.

tableau calculation

If this post was helpful and you would like to receive more of these Tableau tips and tricks, kindly subscribe to our mailing list below.

If you like the work we do and would like to work with us, drop us an email on our Contacts page and we’ll reach out!

Thank you for reading!

Original.png

We Support You Deliver Business-Focused Solutions That Enable Data-Driven Decision Making.

  • Tableau profile
  • YouTube
  • White LinkedIn Icon
  • Facebook
  • X

QUICK LINKS

CONTACT US

+254 738 307 495

East Gate Mall, Donholm

3rd Floor Suite No. 3i

Nairobi, Kenya

Join our mailing list

bottom of page