# Cumulative sum error

**URL:** https://discuss.elastic.co/t/cumulative-sum-error/158896
**Category:** Kibana
**Created:** [November 30, 2018, 12:00pm UTC](https://discuss.elastic.co/t/cumulative-sum-error/158896 "2018-11-30T12:00:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Ruthvik\_Sai](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Ruthvik\_Sai](https://discuss.elastic.co/u/Ruthvik_Sai)
#### Post date: [November 30, 2018, 12:00pm UTC](https://discuss.elastic.co/t/cumulative-sum-error/158896/1 "2018-11-30T12:00:51Z")

</div>

Hi,  
I am getting the following error while running a cumulative sum in kibana? How can I resolve it?

[2018-11-30T17:22:51,686][DEBUG][o.e.a.s.TransportSearchAction] [szFHoO8] [winlogbeat-6.4.2-2018.11.27][2], node[szFHoO8fQPOBQxJ7Qq6yiA], [P], s[STARTED], a[id=KtS8mKcHSEKkMgy\_t177UQ]: Failed to execute [SearchRequest{searchType=QUERY\_THEN\_FETCH, indices=[winlogbeat-_], indicesOptions=IndicesOptions[ignore\_unavailable=true, allow\_no\_indices=true, expand\_wildcards\_open=true, expand\_wildcards\_closed=false, allow\_aliases\_to\_multiple\_indices=true, forbid\_closed\_indices=true, ignore\_aliases=false], types=[], routing='null', preference='1543578649246', requestCache=null, scroll=null, maxConcurrentShardRequests=5, batchedReduceSize=512, preFilterShardSize=64, allowPartialSearchResults=true, source={"size":0,"query":{"bool":{"must":[{"match\_all":{"boost":1.0}},{"range":{"@timestamp":{"from":1542973971561,"to":1543578771561,"include\_lower":true,"include\_upper":true,"format":"epoch\_millis","boost":1.0}}},{"match\_phrase":{"event\_data.NewProcessName":{"query":"C:\Program Files\Microsoft Office\Office16\OUTLOOK.EXE","slop":0,"zero\_terms\_query":"NONE","boost":1.0}}}],"adjust\_pure\_negative":true,"boost":1.0}},"\_source":{"includes":[],"excludes":[]},"stored\_fields":"_","docvalue\_fields":[{"field":"@timestamp","format":"date\_time"}],"script\_fields":{},"aggregations":{"4-bucket":{"terms":{"field":"@timestamp","size":5,"min\_doc\_count":1,"shard\_min\_doc\_count":0,"show\_term\_doc\_count\_error":false,"order":{"\_key":"desc"}}},"4":{"min\_bucket":{"buckets\_path":["4-bucket\>\_count"],"gap\_policy":"skip"}},"5":{"cumulative\_sum":{"buckets\_path":["4"]}}}}}] lastShard [true]  
org.elasticsearch.transport.RemoteTransportException: [szFHoO8][127.0.0.1:9300][indices:data/read/search[phase/query]]  
Caused by: java.lang.IllegalStateException: cumulative sum aggregation [5] must have a histogram or date\_histogram as parent

The aggregation is as below:

 ![Screenshot%20(99)](https://us1.discourse-cdn.com/elastic/original/3X/3/f/3fc92a574ba97b850046ca1d95d80f3d05b4f091.png) !  
 ![Screenshot%20(98)](https://us1.discourse-cdn.com/elastic/original/3X/8/e/8eb2d2d5894760504b74ddf6e8ad9e7f4ffdc8b1.png) !

---

<div class="post-metadata">

### Author: ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)
#### Post date: [December 3, 2018, 6:27pm UTC](https://discuss.elastic.co/t/cumulative-sum-error/158896/2 "2018-12-03T18:27:10Z")

</div>

Your X-Axis isn't shown in the screenshots above. The X-Axis must be either a Date Histogram or Histogram aggregation.

---

<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: [December 31, 2018, 6:27pm UTC](https://discuss.elastic.co/t/cumulative-sum-error/158896/3 "2018-12-31T18:27:10Z")

</div>

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