# Percentage of total calculation

**URL:** <https://discuss.elastic.co/t/percentage-of-total-calculation/275661>\
**Category:** Elasticsearch\
**Created:** [June 11, 2021, 9:02am UTC](https://discuss.elastic.co/t/percentage-of-total-calculation/275661 "2021-06-11T09:02:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![didiViking](https://avatars.discourse-cdn.com/v4/letter/d/9fc348/32.png) [@didiViking](https://discuss.elastic.co/u/didiViking)\
**Post date:** [June 11, 2021, 9:02am UTC](https://discuss.elastic.co/t/percentage-of-total-calculation/275661/1 "2021-06-11T09:02:01Z")

</div>

Hi there,

I'm filtering the requests by request\_length in order to get specific categories (request\_length between 0 and 3mb etc). The next step is to calculate how much of the total (in percentage) that specific category represents: e.g. 0-3mb requests are this much % from the total of requests.  
However, after further searches and applying pie charts I'm not successful in viewing this.  
I'm applying this to a dashboard.  
Can you confirm if this can be done and how?  
Thank you!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 14, 2021, 1:51pm UTC](https://discuss.elastic.co/t/percentage-of-total-calculation/275661/2 "2021-06-14T13:51:08Z")

</div>

How about a pie/donat chart with custom ranges? Maybe supplying a sample document helps for other to udnerstand what you are after. The same goes for an example search request, and what kind of data you are expecting that is not returned.

Thanks!

---

<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 12, 2021, 1:51pm UTC](https://discuss.elastic.co/t/percentage-of-total-calculation/275661/3 "2021-07-12T13:51:17Z")

</div>

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