# Timelion - Adding two time series with filters not working as expected

**URL:** <https://discuss.elastic.co/t/timelion-adding-two-time-series-with-filters-not-working-as-expected/203079>\
**Category:** Kibana\
**Created:** [October 10, 2019, 5:40pm UTC](https://discuss.elastic.co/t/timelion-adding-two-time-series-with-filters-not-working-as-expected/203079 "2019-10-10T17:40:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anikacool.3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anikacool.3/32/55215_2.png) [@anikacool.3](https://discuss.elastic.co/u/anikacool.3)\
**Post date:** [October 10, 2019, 5:40pm UTC](https://discuss.elastic.co/t/timelion-adding-two-time-series-with-filters-not-working-as-expected/203079/1 "2019-10-10T17:40:17Z")

</div>

This is working as expected (in the sense, that at a given time t,  
a+b graph does have value of sum of a and b at time t.

```auto
.es(index=index-*, q=''condition_a').label("a"),
.es(index=index-*, q='condition_b').label("b"),
.es(index=index-*,q='condition_a').add(.es(index=index-*, q='"condition_b')).label("a+b"),

```

However, this does not (i.e. at time t, the value of a+b is not equal to individual values of a and b)

```auto
.es(index=index-*, q=''condition_a AND condition_c').label("a"),
.es(index=index-*, q='condition_b AND condition_c').label("b"),
.es(index=index-*,q='condition_a AND condition_c').add(.es(index=index-*, q='"condition_b AND condition_c')).label("a+b")

```

Any help?

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [October 17, 2019, 7:20pm UTC](https://discuss.elastic.co/t/timelion-adding-two-time-series-with-filters-not-working-as-expected/203079/2 "2019-10-17T19:20:17Z")

</div>

Hmm, that does seem odd. Do you mind sharing a screenshot?

Also do you intentionally have two single quotes before `condition_a` and a double quote before `condition_b` in some of the above?

---

<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:** [November 14, 2019, 7:20pm UTC](https://discuss.elastic.co/t/timelion-adding-two-time-series-with-filters-not-working-as-expected/203079/3 "2019-11-14T19:20:21Z")

</div>

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