# Distinct on cumulative sum

**URL:** <https://discuss.elastic.co/t/distinct-on-cumulative-sum/121256>\
**Category:** Kibana\
**Created:** [February 23, 2018, 4:53pm UTC](https://discuss.elastic.co/t/distinct-on-cumulative-sum/121256 "2018-02-23T16:53:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregoryB-T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregoryb-t/32/28564_2.png) [@GregoryB-T](https://discuss.elastic.co/u/GregoryB-T)\
**Post date:** [February 23, 2018, 4:53pm UTC](https://discuss.elastic.co/t/distinct-on-cumulative-sum/121256/1 "2018-02-23T16:53:30Z")

</div>

Hi,  
I'm trying to represent my metric vis by a histogram to have a trend, but it doesn't work with cumulative sum because in my case he just sum the unique count do you have a way to do that

thanks

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [February 23, 2018, 5:53pm UTC](https://discuss.elastic.co/t/distinct-on-cumulative-sum/121256/2 "2018-02-23T17:53:32Z")

</div>

Can you provide more information? What does your data look like? How are you setting up your aggregations? What are you getting? What would you like to get?

---

<div class="post-metadata">

**Author:** ![GregoryB-T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregoryb-t/32/28564_2.png) [@GregoryB-T](https://discuss.elastic.co/u/GregoryB-T)\
**Post date:** [February 26, 2018, 10:19am UTC](https://discuss.elastic.co/t/distinct-on-cumulative-sum/121256/3 "2018-02-26T10:19:33Z")

</div>

@Nathan_Reese sorry sure today I have metrics like that :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc44aa81789593e86d9840954f30aadc7fc56991.png)

and I'd like a line chart that how shows me the evolution of that metrics, something like that :

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/5/e5c8a90aaa380e4dcc1e6da8bd8eab247eb0d01f.png)

but in this case the max should be 34 not 115 because the 115 is just a cumulative sum and I want something like a cumulative unique count

thanks

---

<div class="post-metadata">

**Author:** ![jakobmalm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jakobmalm/32/29158_2.png) [@jakobmalm](https://discuss.elastic.co/u/jakobmalm)\
**Post date:** [March 22, 2018, 9:12pm UTC](https://discuss.elastic.co/t/distinct-on-cumulative-sum/121256/4 "2018-03-22T21:12:50Z")

</div>

I think I have the same question.

In my words (always difficult to properly describe what you're after in a new field...):

I want to generate a graph that increases for each record with a new unique value of some specified field.

So as events come in, with any number of different fields, but all including the field machineId, I want the graph to increase by 1 when an event comes in with a new value of the field machineId.

---

<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 19, 2018, 9:13pm UTC](https://discuss.elastic.co/t/distinct-on-cumulative-sum/121256/5 "2018-04-19T21:13:08Z")

</div>

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