# Filter in kibana

**URL:** <https://discuss.elastic.co/t/filter-in-kibana/148282>\
**Category:** Kibana\
**Created:** [September 12, 2018, 8:47am UTC](https://discuss.elastic.co/t/filter-in-kibana/148282 "2018-09-12T08:47:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Goz](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@Goz](https://discuss.elastic.co/u/Goz)\
**Post date:** [September 12, 2018, 8:47am UTC](https://discuss.elastic.co/t/filter-in-kibana/148282/1 "2018-09-12T08:47:54Z")

</div>

hello,  
I want to get the selected filter based on a single element in kibana to create pie visualized Browser.

Example :  
I want make this:

select state : 0, state : 1, state : 2 from myTable were host\_name = "SID";

Someone can help me please.  
Thank you for your help.

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [September 14, 2018, 2:45am UTC](https://discuss.elastic.co/t/filter-in-kibana/148282/2 "2018-09-14T02:45:29Z")

</div>

Hi,

in the query bar you'll want to filter the result set:

```auto
(state: 0 OR state:1 OR state:2) AND host_name: SID

```

In visualize you would then do a terms aggregation on state.

---

<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:** [October 12, 2018, 2:45am UTC](https://discuss.elastic.co/t/filter-in-kibana/148282/3 "2018-10-12T02:45:29Z")

</div>

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