# Plot various percentiles in kibana

**URL:** <https://discuss.elastic.co/t/plot-various-percentiles-in-kibana/132056>\
**Category:** Kibana\
**Created:** [May 16, 2018, 8:01am UTC](https://discuss.elastic.co/t/plot-various-percentiles-in-kibana/132056 "2018-05-16T08:01:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mc84](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@mc84](https://discuss.elastic.co/u/mc84)\
**Post date:** [May 16, 2018, 8:01am UTC](https://discuss.elastic.co/t/plot-various-percentiles-in-kibana/132056/1 "2018-05-16T08:01:25Z")

</div>

I have a series of records `(@timestamp, duration)`, for instance:

`(1526397241435, 473.16)`

I would like to have a visualization for that series. On Y axes I'd like to have the percentage from 0% to 100%, on the X axes I'd like to have the duration.  
So I could say: _The X% of the request takes Y ms._

This is an example that I have catched in AWS X-RAY and I would recreate

![38](https://us1.discourse-cdn.com/elastic/original/3X/1/e/1e32257c4f5db13a9e6704d8d14b3190f2804b79.png)

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [May 16, 2018, 9:56pm UTC](https://discuss.elastic.co/t/plot-various-percentiles-in-kibana/132056/2 "2018-05-16T21:56:40Z")

</div>

Hi,

If I understand correctly, you want a histogram of the duration metric as the x-axis, and the Y-axis to be a percentage of the count of documents with that duration, out of the total number of documents. So if you add up all the percentage data values, you'd have 100%. Therefore, the count of documents is normalized to a percentage of the total.

This is a bit of a hard challenge technically, and something that Kibana doesn't currently support. Although, you might want to try to dig up more information talking to Elasticsearch experts.

For more background, Elasticsearch has a concept of pipeline aggregations, where you can take buckets from one kind of aggregation (in your case a `histogram` aggregation across `duration`) and pipe them through to another aggregation, such as a `bucket_script` aggregation, which would let you have a math operation over values of the buckets. However, in getting the references to values in a pipeline aggregation, you can refer to a sibling aggregation (`"buckets_path": "parent>child"`) or a parent aggregation (`"buckets_path": "parent"`) . But in this case, when we have a metric aggregation (total number of documents) that is sibling to the parent aggregation (histogram), your requirement is to reference something like an aunt/uncle metric aggregation, which Elasticsearch currently doesn't support.

---

<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:** [June 13, 2018, 9:56pm UTC](https://discuss.elastic.co/t/plot-various-percentiles-in-kibana/132056/3 "2018-06-13T21:56:52Z")

</div>

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