# Add a filter only for a specific metric of a table

**URL:** https://discuss.elastic.co/t/add-a-filter-only-for-a-specific-metric-of-a-table/54521
**Category:** Kibana
**Created:** [July 1, 2016, 8:58am UTC](https://discuss.elastic.co/t/add-a-filter-only-for-a-specific-metric-of-a-table/54521 "2016-07-01T08:58:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vinuja](https://avatars.discourse-cdn.com/v4/letter/v/a4c791/32.png) [@vinuja](https://discuss.elastic.co/u/vinuja)
#### Post date: [July 1, 2016, 8:58am UTC](https://discuss.elastic.co/t/add-a-filter-only-for-a-specific-metric-of-a-table/54521/1 "2016-07-01T08:58:09Z")

</div>

I have a system that returns Valid or Invalid Results from different hosts. In a table visualization, I would like to introduce 2 metrics: the count per host and the count of valid per host.  
So I create a Data table, with two metrics count and a bucket aggregation for the field "host".

How can I add the filter on the valadation field for the second metric?  
I tried JSON scripts but it didn't work.  
Thanks  
Vinuja

---

<div class="post-metadata">

### Author: ![Khalah\_Jones\_Golden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khalah_jones_golden/32/7169_2.png) [@Khalah\_Jones\_Golden](https://discuss.elastic.co/u/Khalah_Jones_Golden)
#### Post date: [July 1, 2016, 9:03pm UTC](https://discuss.elastic.co/t/add-a-filter-only-for-a-specific-metric-of-a-table/54521/2 "2016-07-01T21:03:25Z")

</div>

Hmm, I looked and I can't think of a good way to get them on the same chart, I know you can have separate charts with data, but I'm at a loss figuring out another way.

---

<div class="post-metadata">

### Author: ![vinuja](https://avatars.discourse-cdn.com/v4/letter/v/a4c791/32.png) [@vinuja](https://discuss.elastic.co/u/vinuja)
#### Post date: [July 4, 2016, 8:21am UTC](https://discuss.elastic.co/t/add-a-filter-only-for-a-specific-metric-of-a-table/54521/3 "2016-07-04T08:21:37Z")

</div>

Yeah I know, But as it is redundant to have it in different charts, and to save space. I would be nice if we can and filter on metrics directly.  
Thank you for your answer.

---

<div class="post-metadata">

### Author: ![Khalah\_Jones\_Golden](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khalah_jones_golden/32/7169_2.png) [@Khalah\_Jones\_Golden](https://discuss.elastic.co/u/Khalah_Jones_Golden)
#### Post date: [July 5, 2016, 3:27pm UTC](https://discuss.elastic.co/t/add-a-filter-only-for-a-specific-metric-of-a-table/54521/4 "2016-07-05T15:27:00Z")

</div>

No worries. Although I think perhaps you can do what your looking for in timelion. Ever use it before?

---

<div class="post-metadata">

### Author: ![vinuja](https://avatars.discourse-cdn.com/v4/letter/v/a4c791/32.png) [@vinuja](https://discuss.elastic.co/u/vinuja)
#### Post date: [July 6, 2016, 7:53am UTC](https://discuss.elastic.co/t/add-a-filter-only-for-a-specific-metric-of-a-table/54521/5 "2016-07-06T07:53:46Z")

</div>

yeah, i have already tried timelion. The only thing is that I want table not timeseries. The fact is I have almost 50 different hosts data, so in a timeserie graph, it will not be lisible.

---

<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:48pm UTC](https://discuss.elastic.co/t/add-a-filter-only-for-a-specific-metric-of-a-table/54521/6 "2017-07-06T13:48:10Z")

</div>


