# Compute a % out of absolute values in Kibana

**URL:** <https://discuss.elastic.co/t/compute-a-out-of-absolute-values-in-kibana/358085>\
**Category:** Kibana\
**Created:** [April 24, 2024, 6:07am UTC](https://discuss.elastic.co/t/compute-a-out-of-absolute-values-in-kibana/358085 "2024-04-24T06:07:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![InesCM](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@InesCM](https://discuss.elastic.co/u/InesCM)\
**Post date:** [April 24, 2024, 6:07am UTC](https://discuss.elastic.co/t/compute-a-out-of-absolute-values-in-kibana/358085/1 "2024-04-24T06:07:08Z")

</div>

Hi there!

I've been searching on the threads for a way to do this, but I'm afraid that it's not something I can do.

Anyway, just in case I missed something: I have 5 nodes reporting used and total memory. I need to show and compute avg memory utilization, in %. It would be something like avg ( used mem/total mem), that is: first compute the memory utilization per node, then make the average.

I've tried to use the formula option to make this, but I can only do something like avg (sum(used mem) / sum (total mem)), which is not what I want. This makes me sum the total used Bytes and divide by the total available bytes, which is like an overall %, but it's not the avg of the % used per node.

Is there a way to do this without modifying index mappings or using scripted fields? I do not have access to that in my Kibana.

Thank you!

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [April 29, 2024, 8:59am UTC](https://discuss.elastic.co/t/compute-a-out-of-absolute-values-in-kibana/358085/2 "2024-04-29T08:59:59Z")

</div>

Hi @InesCM

The best approach here I can recommend is to define the ratio metric first:

```auto
sum(used_mem) / overall_sum(sum(total_mem))

```

The define a `Breakdown` dimension in Lens with the `Collapse by` Average operation.

---

<div class="post-metadata">

**Author:** ![InesCM](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@InesCM](https://discuss.elastic.co/u/InesCM)\
**Post date:** [April 30, 2024, 11:56am UTC](https://discuss.elastic.co/t/compute-a-out-of-absolute-values-in-kibana/358085/3 "2024-04-30T11:56:43Z")

</div>

Hi Marco!

Thanks for your reply!

I'm not sure if I'm understanding, if I define a Breakdown, I do not have a collapse by option. I just have Date Histogram, Filters, Top Values and Intervals.

I'm using Kibana 7.17.6.

Kind regards,  
Inés

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [April 30, 2024, 12:48pm UTC](https://discuss.elastic.co/t/compute-a-out-of-absolute-values-in-kibana/358085/4 "2024-04-30T12:48:42Z")

</div>

It is a function introduced in 8.3.0.

---

<div class="post-metadata">

**Author:** ![InesCM](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@InesCM](https://discuss.elastic.co/u/InesCM)\
**Post date:** [May 6, 2024, 8:09am UTC](https://discuss.elastic.co/t/compute-a-out-of-absolute-values-in-kibana/358085/5 "2024-05-06T08:09:28Z")

</div>

Fully understood, thanks so much!
