# Filter dashboard based on bounds drawn on chloropleth map

**URL:** <https://discuss.elastic.co/t/filter-dashboard-based-on-bounds-drawn-on-chloropleth-map/307978>\
**Category:** Kibana\
**Tags:** maps\
**Created:** [June 23, 2022, 9:48am UTC](https://discuss.elastic.co/t/filter-dashboard-based-on-bounds-drawn-on-chloropleth-map/307978 "2022-06-23T09:48:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NiklasHBB](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@NiklasHBB](https://discuss.elastic.co/u/NiklasHBB)\
**Post date:** [June 23, 2022, 9:48am UTC](https://discuss.elastic.co/t/filter-dashboard-based-on-bounds-drawn-on-chloropleth-map/307978/1 "2022-06-23T09:48:39Z")

</div>

I have followed the [reverse geocoding example](https://www.elastic.co/guide/en/kibana/current/reverse-geocoding-tutorial.html) and the basics work great using Kibana 7.16. I have left the 'apply global search to layer data' option turned off so that the map updates when I filter observations in a dashboard.

Now I would like to filter observations using the 'Draw bounds to filter data' tool such that the remaining visualisations of the dashboard are updated correspondingly. However, the current setup fails. Is there a way to make this work?

Geo filter fails

 ![grafik](https://us1.discourse-cdn.com/elastic/original/3X/3/f/3fc80422fecb07e77e7abef2ed87d29390799091.jpeg)

Attribute filter works

 ![grafik](https://us1.discourse-cdn.com/elastic/original/3X/c/6/c6d19e617f616fa4cd2b5e6b51f2daaecf9e434b.jpeg)

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [June 23, 2022, 11:24am UTC](https://discuss.elastic.co/t/filter-dashboard-based-on-bounds-drawn-on-chloropleth-map/307978/2 "2022-06-23T11:24:59Z")

</div>

Your issue is described [here](https://github.com/elastic/kibana/issues/121210).

The problem is that we have two different sources to filter (the left and right sides of the term join) but filters by default are applied to all sources. This is the same behaviour in Dashboards where a filter is applied to all present data views (aka index patterns).

If you want to filter your business data, that's the right side of the term join then you need to switch off the knob in the **Filtering** panel that refers to **Apply global search to layer data**

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/b/4b1392353c7270b9b954c9d83f46dbdfe9c6e5c7.png)

If you want to filter your geospatial data, that's the left side of the term join, then you need to enable the knob in the **Filtering** panel, and switch off the knob in the **Term joins** panel labeled as **Apply global search to join**

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e0d7ccd41dec2fc917b1f26466a9ecdbfa6a9b54.png)

You can take a look at the queries performed using the **Inspect** tool and see how the filters are applied to the two sources.

* * *

The only way I can imagine you can apply both types of filters are making your right source having a geometry with the same name (say `coordinates`) of the left side, and then disabling the **Filtering** switch only so you pass the geospatial filter to the data on the right side (the points) instead of the polygons.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/e/aeec43987d3bbcb5a23a84d1396f5398d068bd48.png)

This feels a bit of a hack, but it may work for your use case.

cc @Nathan_Reese

---

<div class="post-metadata">

**Author:** ![NiklasHBB](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@NiklasHBB](https://discuss.elastic.co/u/NiklasHBB)\
**Post date:** [June 23, 2022, 1:45pm UTC](https://discuss.elastic.co/t/filter-dashboard-based-on-bounds-drawn-on-chloropleth-map/307978/3 "2022-06-23T13:45:43Z")

</div>

Awesome. Thank you for the quick reply and the detailed explanation. I will try the hack 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 21, 2022, 1:46pm UTC](https://discuss.elastic.co/t/filter-dashboard-based-on-bounds-drawn-on-chloropleth-map/307978/4 "2022-07-21T13:46:29Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
