# Add filter to timelion query

**URL:** https://discuss.elastic.co/t/add-filter-to-timelion-query/120676
**Category:** Kibana
**Tags:** timelion
**Created:** [February 20, 2018, 3:54pm UTC](https://discuss.elastic.co/t/add-filter-to-timelion-query/120676 "2018-02-20T15:54:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![suryabh](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@suryabh](https://discuss.elastic.co/u/suryabh)
#### Post date: [February 20, 2018, 3:54pm UTC](https://discuss.elastic.co/t/add-filter-to-timelion-query/120676/1 "2018-02-20T15:54:38Z")

</div>

I starting playing around with timelion recently. It is a neat tool. I have a issue that I am running into right now. In my data I have a field "site\_name". The value of this field can be 936001,936111,936222 etc. I want to create a timelion graph showing average of the metric (total\_Mob\_succ\_rate) for all entries where site\_name has the string '9360' in the site\_name. I have the following right now -

// .es(_,index=ls-enbkpi-_,metric=avg:total\_Mob\_succ\_rate,q='site\_name.raw:9360\*')

With the above I am seeing two series on the timelion -

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

the one in red is I believe the avg of the values for sites that match the query - q='site\_name.raw:9360\*'  
The one in blue is avg of the values for all sites.

So 2 questions -

1. Why is the timelion showing 2 series ?
2. How can I get rid of the series in blue.

---

<div class="post-metadata">

### Author: ![ppisljar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ppisljar/32/11588_2.png) [@ppisljar](https://discuss.elastic.co/u/ppisljar)
#### Post date: [February 20, 2018, 3:57pm UTC](https://discuss.elastic.co/t/add-filter-to-timelion-query/120676/2 "2018-02-20T15:57:03Z")

</div>

try to remove `*,` from your timelion expression. you are creating two queries at the moment.

---

<div class="post-metadata">

### Author: ![suryabh](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@suryabh](https://discuss.elastic.co/u/suryabh)
#### Post date: [February 20, 2018, 3:59pm UTC](https://discuss.elastic.co/t/add-filter-to-timelion-query/120676/3 "2018-02-20T15:59:20Z")

</div>

Ah ha, Thanks. that did the trick.

---

<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: [March 20, 2018, 4:07pm UTC](https://discuss.elastic.co/t/add-filter-to-timelion-query/120676/4 "2018-03-20T16:07:25Z")

</div>

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