![intersects function in Tableau](https://static.wixstatic.com/media/e16c6a_3969c19e6ff14326b837fc7de8b00e7c~mv2.png/v1/fill/w_980,h_513,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/e16c6a_3969c19e6ff14326b837fc7de8b00e7c~mv2.png)
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](https://static.wixstatic.com/media/e16c6a_b063c5d9e6fb4d0d8c166989c178efa7~mv2.png/v1/fill/w_980,h_508,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/e16c6a_b063c5d9e6fb4d0d8c166989c178efa7~mv2.png)
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](https://static.wixstatic.com/media/e16c6a_e5bb206af41442f5a64a933810a47d2d~mv2.png/v1/fill/w_655,h_121,al_c,q_85,enc_avif,quality_auto/e16c6a_e5bb206af41442f5a64a933810a47d2d~mv2.png)
(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](https://static.wixstatic.com/media/e16c6a_1b9d1d7f292f48dca70fb5376ae73812~mv2.png/v1/fill/w_980,h_509,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/e16c6a_1b9d1d7f292f48dca70fb5376ae73812~mv2.png)
Create an INTERSECTS calculation using the health facilities points and the buffer calculation as shown below.
![creating an intersect calculation in tableau](https://static.wixstatic.com/media/e16c6a_b51158824edb4d4b9e684fb6c857a48d~mv2.png/v1/fill/w_652,h_150,al_c,q_85,enc_avif,quality_auto/e16c6a_b51158824edb4d4b9e684fb6c857a48d~mv2.png)
Add this calculation to the color shelf.
![point map](https://static.wixstatic.com/media/e16c6a_7170e5e3960943f09f9c1c5ecf019456~mv2.png/v1/fill/w_980,h_513,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/e16c6a_7170e5e3960943f09f9c1c5ecf019456~mv2.png)
Add parameters to empower users dynamically adjust the number and units used to compute the buffer around your point of interest.
![point map](https://static.wixstatic.com/media/e16c6a_6b8883c2b86247bb94a93cf37dbc882c~mv2.png/v1/fill/w_980,h_507,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/e16c6a_6b8883c2b86247bb94a93cf37dbc882c~mv2.png)
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](https://static.wixstatic.com/media/e16c6a_361467f29cf34d6d8a7db160a5672699~mv2.png/v1/fill/w_649,h_151,al_c,q_85,enc_avif,quality_auto/e16c6a_361467f29cf34d6d8a7db160a5672699~mv2.png)
As well as compute the percent of the total facilities using the calculation below.
![tableau calculation](https://static.wixstatic.com/media/e16c6a_6caeed0233ea41c6885b3ead6c2ae56c~mv2.png/v1/fill/w_651,h_119,al_c,q_85,enc_avif,quality_auto/e16c6a_6caeed0233ea41c6885b3ead6c2ae56c~mv2.png)
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!