# Weighted Average Aggregation Support in Rollup

**URL:** <https://discuss.elastic.co/t/weighted-average-aggregation-support-in-rollup/174300>\
**Category:** Elasticsearch\
**Created:** [March 28, 2019, 10:12am UTC](https://discuss.elastic.co/t/weighted-average-aggregation-support-in-rollup/174300 "2019-03-28T10:12:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vipul\_Narula](https://avatars.discourse-cdn.com/v4/letter/v/b782af/32.png) [@Vipul\_Narula](https://discuss.elastic.co/u/Vipul_Narula)\
**Post date:** [March 28, 2019, 10:12am UTC](https://discuss.elastic.co/t/weighted-average-aggregation-support-in-rollup/174300/1 "2019-03-28T10:12:05Z")

</div>

Current version of Es Rollup API have no support for percentiles or weighted averages.  
It would be of great help if any plan to include the features in future versions or any tentative time line is shared

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [April 1, 2019, 12:18pm UTC](https://discuss.elastic.co/t/weighted-average-aggregation-support-in-rollup/174300/2 "2019-04-01T12:18:36Z")

</div>

Hi. You're correct, neither of those are supported at the moment. There's a github ticket tracking the ability to add "datastructure-based" metrics like percentiles and cardinality: [https://github.com/elastic/elasticsearch/issues/33214](https://github.com/elastic/elasticsearch/issues/33214)

As for weighted average... I bet we could support that without too much work... it should be simpler than more complex metrics like percentiles/cardinality. I think it would be mostly like the regular average today (saving sum + count), except we'll also have to accumulate the weight. I'll take a look and file a ticket.

---

<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 29, 2019, 12:18pm UTC](https://discuss.elastic.co/t/weighted-average-aggregation-support-in-rollup/174300/3 "2019-04-29T12:18:50Z")

</div>

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