# How many tasks are active?

**URL:** https://discuss.elastic.co/t/how-many-tasks-are-active/165955
**Category:** Kibana
**Created:** [January 28, 2019, 8:29am UTC](https://discuss.elastic.co/t/how-many-tasks-are-active/165955 "2019-01-28T08:29:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Skeeve](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Skeeve](https://discuss.elastic.co/u/Skeeve)
#### Post date: [January 28, 2019, 8:29am UTC](https://discuss.elastic.co/t/how-many-tasks-are-active/165955/1 "2019-01-28T08:29:52Z")

</div>

I'm wondering whether or not this can be visualized.

I have data similar to this:

```
{"task":"A", "created_at":"2019-01-28T00:01:02Z","updated_at":"2019-01-28T00:02:03Z"}

```

Now it's trivial to get a graph of the count of all tasks which were started (created\_at) in a certain timeframe.

It's also trivial to get that graph for the tasks which finished (updated\_at) in a timeframe.

But is it possible to get a count of all the tasks which were active in a timeframe? For this I think I will have to count all tasks which were created in the timeframe and subtract all of those which were started in the timeframe and also finished.

So I want to see a graph (a line) which shows the number of tasks active at each moment in the timeframe.

With timelion I managed to created something like that by reformattiong the data a bit, but it only works when I view the graph from the start of my data collection. Not for any timeframe in between because I will get negative values as stopped tasks, started before the timeframe will also be subtracted.

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [February 18, 2019, 3:36pm UTC](https://discuss.elastic.co/t/how-many-tasks-are-active/165955/2 "2019-02-18T15:36:03Z")

</div>

@timroes can we please get some help here?

Thanks,  
Bhavya

---

<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: [March 18, 2019, 3:36pm UTC](https://discuss.elastic.co/t/how-many-tasks-are-active/165955/3 "2019-03-18T15:36:12Z")

</div>

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