top of page
  • Bernard K

INTERSECTS () Spatial Function in Tableau


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.

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.

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

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.

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!

Comments


Blog.png
Black & white.jpg

About Me

More About the Author

Bernard K

Analytics Consultant | 3X Tableau Certified

Bernard is a data analytics consultant helping businesses reveal the true power of their data and bring clarity to their reporting dashboards. He loves building things and sharing knowledge on how to build dashboards that drive better outcomes.

Let’s discuss your data challenges! Let’s work together!

bottom of page