# How to show job count during all the time it was running?

**URL:** <https://discuss.elastic.co/t/how-to-show-job-count-during-all-the-time-it-was-running/191192>\
**Category:** Kibana\
**Created:** [July 18, 2019, 12:03pm UTC](https://discuss.elastic.co/t/how-to-show-job-count-during-all-the-time-it-was-running/191192 "2019-07-18T12:03:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nadavh](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nadavh](https://discuss.elastic.co/u/nadavh)\
**Post date:** [July 18, 2019, 12:03pm UTC](https://discuss.elastic.co/t/how-to-show-job-count-during-all-the-time-it-was-running/191192/1 "2019-07-18T12:03:55Z")

</div>

Hey,  
I have index of jobs which run in our system with their start time and total time fields.  
How do I show in vertical bars or other form of visual their stat through time, meaning when Kibana count the job when ever it was running. (Meaning from start time + total\_time = end\_time)  
I tried to show it with the suggestion I found here with sum of total\_time but it didn't show me the current stat I wanted.  
Any suggestions?

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [July 18, 2019, 5:45pm UTC](https://discuss.elastic.co/t/how-to-show-job-count-during-all-the-time-it-was-running/191192/2 "2019-07-18T17:45:04Z")

</div>

I can't see any way of calculating this in Elasticsearch and Kibana.  
The only where you could get the expected result would be when you would have a document at the start of the job and another document at the end of the job.You could have a field in each document: "started`for the start document with the value 1 and "ended` for the end document with the value 1 as well.  
Then you could do a cumulative sum aggregation on the started, a cumulative sum aggregation on the ended field and then do a diff between them using the Math aggregation in Visual Builder.

---

<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:** [August 15, 2019, 5:45pm UTC](https://discuss.elastic.co/t/how-to-show-job-count-during-all-the-time-it-was-running/191192/3 "2019-08-15T17:45:05Z")

</div>

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