# Display growing count of objects

**URL:** <https://discuss.elastic.co/t/display-growing-count-of-objects/238415>\
**Category:** Kibana\
**Created:** [June 24, 2020, 9:11am UTC](https://discuss.elastic.co/t/display-growing-count-of-objects/238415 "2020-06-24T09:11:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kurtgn](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kurtgn](https://discuss.elastic.co/u/kurtgn)\
**Post date:** [June 24, 2020, 9:11am UTC](https://discuss.elastic.co/t/display-growing-count-of-objects/238415/1 "2020-06-24T09:11:09Z")

</div>

I am registering subscribers in my Elasticsearch database. Each subscriber has a `CREATED_AT` timestamp field. And I can create a chart that shows how many new subscribers I get each day. This is easily done just by grouping the documents into timestamp buckets.

But what if I need to show an ever-growing amount of users each day? For example:

- on June 1st I had total 15 users (counting all objects with `CREATED_AT` \<= June 1st)
- on June 2nd I had 4 new users and a total of 19 users (counting all objects with `CREATED_AT` \<= June 2nd)
- on June 3rd I had 10 new users and a total of 29 users (counting all objects with `CREATED_AT` \<= June 3rd)
- etc

And this should result in a timeseries data like this:

```auto

June 1st: 15
June 2nd: 19
June 3rd: 29
...

```

What aggregation should I pick for this?

---

<div class="post-metadata">

**Author:** ![abrx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abrx/32/43881_2.png) [@abrx](https://discuss.elastic.co/u/abrx)\
**Post date:** [June 24, 2020, 9:51am UTC](https://discuss.elastic.co/t/display-growing-count-of-objects/238415/2 "2020-06-24T09:51:54Z")

</div>

Just plot the numbers of documents (aka users) by timestamp (bar chart or plot or whatever) and set minimum interval to daily in the x-axis date histogram specifications.  
It will show how many documents (filtered if necessary to get only new users) indexed each days.

---

<div class="post-metadata">

**Author:** ![kurtgn](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kurtgn](https://discuss.elastic.co/u/kurtgn)\
**Post date:** [June 25, 2020, 6:48am UTC](https://discuss.elastic.co/t/display-growing-count-of-objects/238415/3 "2020-06-25T06:48:26Z")

</div>

thanks, but which one of these aggregations is the number of documents by timestamp? I only see count, and this count is separate for each day, it does not include counts for all previous timestamps.

 ![Screenshot at Jun 25 09-44-00](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fba927832e64d1bd03387facadea87d0aca26d2b.jpeg)

---

<div class="post-metadata">

**Author:** ![abrx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abrx/32/43881_2.png) [@abrx](https://discuss.elastic.co/u/abrx)\
**Post date:** [June 25, 2020, 9:59am UTC](https://discuss.elastic.co/t/display-growing-count-of-objects/238415/4 "2020-06-25T09:59:25Z")

</div>

Count, as described [here](https://www.elastic.co/guide/en/kibana/current/supported-aggregations.html#visualize-metric-aggregations).

---

<div class="post-metadata">

**Author:** ![kurtgn](https://avatars.discourse-cdn.com/v4/letter/k/bc8723/32.png) [@kurtgn](https://discuss.elastic.co/u/kurtgn)\
**Post date:** [June 25, 2020, 2:57pm UTC](https://discuss.elastic.co/t/display-growing-count-of-objects/238415/5 "2020-06-25T14:57:44Z")

</div>

Count does not work for me, because In my case, the count will show:

```auto
June 1st: 15
June 2nd: 4
June 3rd: 10
...

```

but I need something that would show an ever-incrementing value:

```auto
June 1st: 15
June 2nd: 19
June 3rd: 29
...

```

where each bucket includes counts for all previous days + its own count.

---

<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:** [July 23, 2020, 2:57pm UTC](https://discuss.elastic.co/t/display-growing-count-of-objects/238415/6 "2020-07-23T14:57:46Z")

</div>

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