# Creating buckets on x-axis based on percentile in kibana

**URL:** <https://discuss.elastic.co/t/creating-buckets-on-x-axis-based-on-percentile-in-kibana/56945>\
**Category:** Kibana\
**Created:** [August 2, 2016, 3:26am UTC](https://discuss.elastic.co/t/creating-buckets-on-x-axis-based-on-percentile-in-kibana/56945 "2016-08-02T03:26:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrewn](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@shrewn](https://discuss.elastic.co/u/shrewn)\
**Post date:** [August 2, 2016, 3:26am UTC](https://discuss.elastic.co/t/creating-buckets-on-x-axis-based-on-percentile-in-kibana/56945/1 "2016-08-02T03:26:59Z")

</div>

I have 2 fields, A & B in my document. I want to create buckets on the x-axis based on percentiles of A say p20, p40, p60, p80 and p100. On the y-axis I want to plot the average of field B within each of the buckets.

One of the aggregations available on the y axis while using kibana is percentile. I wanted to know if it was possible to create buckets on x-axis with percentile

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [August 2, 2016, 4:14pm UTC](https://discuss.elastic.co/t/creating-buckets-on-x-axis-based-on-percentile-in-kibana/56945/2 "2016-08-02T16:14:17Z")

</div>

This isn't currently possible with Elasticsearch, but there is an open issue for it: [https://github.com/elastic/elasticsearch/issues/19546](https://github.com/elastic/elasticsearch/issues/19546)

---

<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:** [July 6, 2017, 1:42pm UTC](https://discuss.elastic.co/t/creating-buckets-on-x-axis-based-on-percentile-in-kibana/56945/3 "2017-07-06T13:42:23Z")

</div>


