# Pipeline cumulative aggregation just works for Histogram

**URL:** https://discuss.elastic.co/t/pipeline-cumulative-aggregation-just-works-for-histogram/111272
**Category:** Elasticsearch
**Created:** [December 12, 2017, 8:34am UTC](https://discuss.elastic.co/t/pipeline-cumulative-aggregation-just-works-for-histogram/111272 "2017-12-12T08:34:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hym](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hym/32/22399_2.png) [@hym](https://discuss.elastic.co/u/hym)
#### Post date: [December 12, 2017, 8:34am UTC](https://discuss.elastic.co/t/pipeline-cumulative-aggregation-just-works-for-histogram/111272/1 "2017-12-12T08:34:36Z")

</div>

Hi,  
I want to use [CumulativeSumAggregation](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/search-aggregations-pipeline-cumulative-sum-aggregation.html) but as it is a Parent pipelineAggregation just accept DateHistogram or Histogram as a parent.

In my case, I have a DateHistogram on the top but in the second level I have a term Aggregation and after that, I have the pipeline.

-- DateHistogram  
-- Terms Aggregation  
-- sum Aggregation  
-- pipelineCumulativeSum

I can use Histogram Aggregation instead of Terms Aggregation but the problem is, it creates a lot of empty buckets (because of the interval). Is there any way to add some more data to the first level Aggregation (DateHistogram) documents and in the second level just make aggregation based on that additional data?

Thanks in advance

---

<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: [January 9, 2018, 8:34am UTC](https://discuss.elastic.co/t/pipeline-cumulative-aggregation-just-works-for-histogram/111272/2 "2018-01-09T08:34:36Z")

</div>

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