# Timelion error when data doesn't exist

**URL:** <https://discuss.elastic.co/t/timelion-error-when-data-doesnt-exist/65576>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [November 10, 2016, 3:16am UTC](https://discuss.elastic.co/t/timelion-error-when-data-doesnt-exist/65576 "2016-11-10T03:16:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvenkat\_in](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mvenkat\_in](https://discuss.elastic.co/u/mvenkat_in)\
**Post date:** [November 10, 2016, 3:16am UTC](https://discuss.elastic.co/t/timelion-error-when-data-doesnt-exist/65576/1 "2016-11-10T03:16:02Z")

</div>

Hi  
I am using Timelion to display the transaction trend comparison between Today, Day -1 and Day-5.

Below is my query

```auto
(.es(q="_type:ussd AND service:USERECHARGECARD",metric="avg:response_time").fit(carry).label("Day"),.es(q="_type:ussd AND service:USERECHARGECARD",metric="avg:response_time",offset=-1d).fit(carry).label("Day-1"),.es(q="_type:ussd AND service:USERECHARGECARD",metric="avg:response_time",offset=-5d).fit(carry).label("Day-5")).title("Voucher Topup Avg Latency")

```

However the data (index) for Day-5 doesn't exist and hence facing the following issues:  
1- "Error Timelion: Error: in cell #1: Cannot read property '1' of undefined" with the stacktrace as below

```auto
Error: in cell #1: Cannot read property '1' of undefined
    at throwWithCell (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/src/core_plugins/timelion/server/handlers/chain_runner.js:30:11)
    at /elkapp/elk/app/kibana-5.0.0-linux-x86_64/src/core_plugins/timelion/server/handlers/chain_runner.js:192:11
    at bound (domain.js:280:14)
    at runBound (domain.js:293:12)
    at tryCatcher (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/promise.js:503:31)
    at Promise._settlePromiseAt (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/promise.js:577:18)
    at Promise._settlePromises (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/promise.js:693:14)
    at Async._drainQueue (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/elkapp/elk/app/kibana-5.0.0-linux-x86_64/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

```

Another query for Day-5 is working fine. The only difference is I am using metric and hence seems failing.

Pls advice if there is any error in syntax and Timelion should not throw error even if there is no data.

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [November 11, 2016, 9:47pm UTC](https://discuss.elastic.co/t/timelion-error-when-data-doesnt-exist/65576/2 "2016-11-11T21:47:25Z")

</div>

Looks like you found a bug @mvenkat_in

I filed [https://github.com/elastic/kibana/issues/9053](https://github.com/elastic/kibana/issues/9053) and fixed it in [https://github.com/elastic/kibana/pull/9054](https://github.com/elastic/kibana/pull/9054). Hopefully we can get those merged soon and released with 5.1.0

---

<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:** [December 9, 2016, 9:47pm UTC](https://discuss.elastic.co/t/timelion-error-when-data-doesnt-exist/65576/3 "2016-12-09T21:47:28Z")

</div>

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