# Math in Metric Visualization

**URL:** <https://discuss.elastic.co/t/math-in-metric-visualization/320249>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [December 1, 2022, 1:56pm UTC](https://discuss.elastic.co/t/math-in-metric-visualization/320249 "2022-12-01T13:56:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Mobley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tim_mobley/32/94741_2.png) [@Tim\_Mobley](https://discuss.elastic.co/u/Tim_Mobley)\
**Post date:** [December 1, 2022, 1:56pm UTC](https://discuss.elastic.co/t/math-in-metric-visualization/320249/1 "2022-12-01T13:56:46Z")

</div>

I am trying to create a metric visualization that shows the system memory in GB (from Metricbeat's `system.memory` field). However, I was it to display in GB and the field value is shown in bytes (binary). How/where do I add arithmetic to the visual so I can convert this to make it more human readable? And if this is not possible in the visual, can I do this further upstream (e.g., in metricbeat.yml)?

- I am on version 8.3.2 for all Elastic Stack components.
- A [similar discussion](https://discuss.elastic.co/t/simple-arithmetic-in-a-kibana-visualization/86000) said this can be done in TSVB, but what about the Metric visual?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [December 1, 2022, 11:14pm UTC](https://discuss.elastic.co/t/math-in-metric-visualization/320249/2 "2022-12-01T23:14:47Z")

</div>

HI @Tim_Mobley

You should use Lens Not the legacy metric visualization.

I think this will happen automatically if you use Lens

You can set the format to bytes.

Yyou can go to the Data View find that field and tell it the kind of format you want. Which should be already set for in known metrics.

You don't need to do math for sure.

Lens ... No Math Human Readable

 ![Screen Shot 2022-12-01 at 3.06.57 PM](https://us1.discourse-cdn.com/elastic/original/3X/1/1/11fd6ed20265af1086c11879677ea322bcb7573b.jpeg)

There is even the new cool Gauge in Lens I did have to set Format to Bytes

 ![Screen Shot 2022-12-01 at 3.14.09 PM](https://us1.discourse-cdn.com/elastic/original/3X/9/f/9fbdc06a11b02f0d0fce59ccfd297e054d99643d.png)

And you know there are a bunch of the Out Of The Box Dashboards ...

---

<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:** [December 29, 2022, 11:15pm UTC](https://discuss.elastic.co/t/math-in-metric-visualization/320249/3 "2022-12-29T23:15:25Z")

</div>

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