# Cumulative sum till date

**URL:** https://discuss.elastic.co/t/cumulative-sum-till-date/105518
**Category:** Kibana
**Created:** [October 27, 2017, 6:18am UTC](https://discuss.elastic.co/t/cumulative-sum-till-date/105518 "2017-10-27T06:18:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SHUBHAM\_GUPTA](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@SHUBHAM\_GUPTA](https://discuss.elastic.co/u/SHUBHAM_GUPTA)
#### Post date: [October 27, 2017, 6:18am UTC](https://discuss.elastic.co/t/cumulative-sum-till-date/105518/1 "2017-10-27T06:18:49Z")

</div>

Hey ,  
I have data in elasticsearch with indexing at date.  
For example - I have data like this -\>  
12 oct 2017 -\> value =30  
13 oct 2017-\> value =20  
14 oct 2017 -\> value =60

I can create dashboard with date as x-axis and corresponding value on y-axis.  
**But now i want aggregation of value till the date .**  
So i want  
12 oct 2017 - \>value=30  
13 oct -\>value .= 30+20=50  
14 oct -\>value = 30+20+60=110  
How can i do that? I donot want to change the data in elasticsearch. Just need a way to visualize data in this way.  
Thanks

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [October 27, 2017, 8:21pm UTC](https://discuss.elastic.co/t/cumulative-sum-till-date/105518/2 "2017-10-27T20:21:17Z")

</div>

Create a visualization where the x-axis is a date histogram on the time field and set the Y-axis metric to the _sum_ of a given field. The adjust the time bucketing to show the chunks of time you care about.

If you simply need a sum of all values in the selected timeframe, just use a Metric vis with the sum of the count field.

---

<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: [November 24, 2017, 8:21pm UTC](https://discuss.elastic.co/t/cumulative-sum-till-date/105518/3 "2017-11-24T20:21:19Z")

</div>

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