# Adding Filter to Term Aggregation in Kibana 4

**URL:** https://discuss.elastic.co/t/adding-filter-to-term-aggregation-in-kibana-4/48050
**Category:** Kibana
**Created:** [April 21, 2016, 1:59pm UTC](https://discuss.elastic.co/t/adding-filter-to-term-aggregation-in-kibana-4/48050 "2016-04-21T13:59:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Pavithrananda\_Prabhu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pavithrananda_prabhu/32/12220_2.png) [@Pavithrananda\_Prabhu](https://discuss.elastic.co/u/Pavithrananda_Prabhu)
#### Post date: [April 21, 2016, 1:59pm UTC](https://discuss.elastic.co/t/adding-filter-to-term-aggregation-in-kibana-4/48050/1 "2016-04-21T13:59:26Z")

</div>

Hello,

I am a lineChart in Kibana 4 where i am using Term Aggregation

on the Y Axis i am using the Metric Sum on the CPUUTIL Field

On the X Axis i am using Term Aggregation on the field Programname below are the screen shots

![](https://us1.discourse-cdn.com/elastic/original/2X/a/a8f3b0b35ae2331cfb637980a1fcaf56ce28849b.jpg)

![](https://us1.discourse-cdn.com/elastic/original/2X/c/cc660443245786d0f71f27112cdf1c21f1d1e353.jpg)

I would like to add a filter to this Term Aggregation "jobname= 'YGACJD89'" Is there anyway we can do this in Kibana?

Also we should be able to dynamically change the jobname when this visualization is added to a Dashboard

---

<div class="post-metadata">

### Author: ![BigFunger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bigfunger/32/7323_2.png) [@BigFunger](https://discuss.elastic.co/u/BigFunger)
#### Post date: [April 21, 2016, 4:49pm UTC](https://discuss.elastic.co/t/adding-filter-to-term-aggregation-in-kibana-4/48050/2 "2016-04-21T16:49:52Z")

</div>

There are a couple of ways that you can accomplish this.

- The easiest way is to just use the Search box at the top of the screen and type in: `jobname=YGACJD89`

- Add a filter to the visualization by clicking on any data point. Then edit the filter to filter by `jobname` instead of `programname`

- ![](https://us1.discourse-cdn.com/elastic/original/2X/9/9b11f38686d07b7f96d92c0cc7550a3631c988f1.png)

- ![](https://us1.discourse-cdn.com/elastic/original/2X/6/68638acd78daa29b6dd3c88ba95968d13a607032.png)

Please let me know if that doesn't solve your problem.

---

<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 6, 2017, 1:55pm UTC](https://discuss.elastic.co/t/adding-filter-to-term-aggregation-in-kibana-4/48050/3 "2017-07-06T13:55:27Z")

</div>


