# What does timelion return in 0/0 (kibana 6.8.2)

**URL:** <https://discuss.elastic.co/t/what-does-timelion-return-in-0-0-kibana-6-8-2/201357>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [September 27, 2019, 7:35am UTC](https://discuss.elastic.co/t/what-does-timelion-return-in-0-0-kibana-6-8-2/201357 "2019-09-27T07:35:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tnk](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@tnk](https://discuss.elastic.co/u/tnk)\
**Post date:** [September 27, 2019, 7:35am UTC](https://discuss.elastic.co/t/what-does-timelion-return-in-0-0-kibana-6-8-2/201357/1 "2019-09-27T07:35:43Z")

</div>

I would like to ask a question about timelion, related to this topic :  
[What does timelion return in zero division (kibana 7.1.1)](https://discuss.elastic.co/t/what-does-timelion-return-in-zero-division-kibana-7-1-1/196228)

The result of a division of 0 by 0 in JavaScript seems to be NaN.  
So I tried on a code below:

`.static(0).divide(0).if(eq, NaN, 0 ,1)`

However, this returned an error: `Timelion: Error: in cell #1: must be a number or a seriesList`

I want to show **0** in straight forward manner using simple condition like above, though I do not know how to handle result of `0 divided by 0`.

---

<div class="post-metadata">

**Author:** ![apiras](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@apiras](https://discuss.elastic.co/u/apiras)\
**Post date:** [September 27, 2019, 9:10am UTC](https://discuss.elastic.co/t/what-does-timelion-return-in-0-0-kibana-6-8-2/201357/2 "2019-09-27T09:10:25Z")

</div>

Try something like  
`.static(0).divide(.es().if(eq, 0 ,1))`

---

<div class="post-metadata">

**Author:** ![tnk](https://avatars.discourse-cdn.com/v4/letter/t/6bbea6/32.png) [@tnk](https://discuss.elastic.co/u/tnk)\
**Post date:** [October 2, 2019, 5:06am UTC](https://discuss.elastic.co/t/what-does-timelion-return-in-0-0-kibana-6-8-2/201357/3 "2019-10-02T05:06:11Z")

</div>

Thanks!  
It was an effective workaround to display 0 instead the result of `0 divided by 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:** [October 30, 2019, 5:06am UTC](https://discuss.elastic.co/t/what-does-timelion-return-in-0-0-kibana-6-8-2/201357/4 "2019-10-30T05:06:13Z")

</div>

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