# Weighted percentile aggregation

**URL:** <https://discuss.elastic.co/t/weighted-percentile-aggregation/178248>\
**Category:** Elasticsearch\
**Created:** [April 24, 2019, 12:22pm UTC](https://discuss.elastic.co/t/weighted-percentile-aggregation/178248 "2019-04-24T12:22:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![romainneutron](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/romainneutron/32/96533_2.png) [@romainneutron](https://discuss.elastic.co/u/romainneutron)\
**Post date:** [April 24, 2019, 12:22pm UTC](https://discuss.elastic.co/t/weighted-percentile-aggregation/178248/1 "2019-04-24T12:22:25Z")

</div>

Hello,

I would like to compute a weighted percentile aggregation and I don't find a way to achieve this combining the existing aggregation.

My use case is I have documents that have an "age" property with a weight. This weight is a float number.  
I would like to compute the percentile aggregation taking the weight as it's done for the WeightedAverage aggregation.

Does anybody have a trick to help me achieve this?

---

<div class="post-metadata">

**Author:** ![romainneutron](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/romainneutron/32/96533_2.png) [@romainneutron](https://discuss.elastic.co/u/romainneutron)\
**Post date:** [April 25, 2019, 8:39am UTC](https://discuss.elastic.co/t/weighted-percentile-aggregation/178248/2 "2019-04-25T08:39:48Z")

</div>

See [https://github.com/elastic/elasticsearch/issues/41479](https://github.com/elastic/elasticsearch/issues/41479)

---

<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:** [May 23, 2019, 8:39am UTC](https://discuss.elastic.co/t/weighted-percentile-aggregation/178248/3 "2019-05-23T08:39:49Z")

</div>

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