# Can i plot an cumulative average line in timelion?

**URL:** <https://discuss.elastic.co/t/can-i-plot-an-cumulative-average-line-in-timelion/78828>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [March 16, 2017, 9:29am UTC](https://discuss.elastic.co/t/can-i-plot-an-cumulative-average-line-in-timelion/78828 "2017-03-16T09:29:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiran\_kumar\_sukumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiran_kumar_sukumar/32/16319_2.png) [@kiran\_kumar\_sukumar](https://discuss.elastic.co/u/kiran_kumar_sukumar)\
**Post date:** [March 16, 2017, 9:29am UTC](https://discuss.elastic.co/t/can-i-plot-an-cumulative-average-line-in-timelion/78828/1 "2017-03-16T09:29:23Z")

</div>

Hi,  
We have 100 test instances to execute over a period of 10 days. Im currently following up the execution using a time series in Timelion. Can i have a sort of average line in Timelion that says that we must be executing atleast 10 test cases everyday to keep a healthy progress ?

A line which says this is where the numbers should fall to complete in time

Regards  
Kiran

---

<div class="post-metadata">

**Author:** ![kiran\_kumar\_sukumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiran_kumar_sukumar/32/16319_2.png) [@kiran\_kumar\_sukumar](https://discuss.elastic.co/u/kiran_kumar_sukumar)\
**Post date:** [March 16, 2017, 10:42am UTC](https://discuss.elastic.co/t/can-i-plot-an-cumulative-average-line-in-timelion/78828/2 "2017-03-16T10:42:36Z")

</div>

Hi Guys,  
I just found out the solution for this. I did the following

.es(metric='count').aggregate(avg).cusum().color(violet)

I did a metric count and did the agggregate avg and calculated the cumulative sum.

I had to install timelion extras from here [https://github.com/rashidkpc/timelion-extras/tree/master](https://github.com/rashidkpc/timelion-extras/tree/master) to enable the aggregate function in timelion

Regards  
Kiran

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [March 16, 2017, 1:21pm UTC](https://discuss.elastic.co/t/can-i-plot-an-cumulative-average-line-in-timelion/78828/3 "2017-03-16T13:21:39Z")

</div>

@kiran_kumar_sukumar I'm glad to hear you were able to figure out the solution, and thanks for sharing it with others!

---

<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:** [April 13, 2017, 1:22pm UTC](https://discuss.elastic.co/t/can-i-plot-an-cumulative-average-line-in-timelion/78828/4 "2017-04-13T13:22:04Z")

</div>

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