# How to use formulas when creating dashboards?

**URL:** https://discuss.elastic.co/t/how-to-use-formulas-when-creating-dashboards/335855
**Category:** Kibana
**Tags:** dashboard
**Created:** [June 13, 2023, 10:01am UTC](https://discuss.elastic.co/t/how-to-use-formulas-when-creating-dashboards/335855 "2023-06-13T10:01:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Avinash\_Pattnaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash_pattnaik/32/107048_2.png) [@Avinash\_Pattnaik](https://discuss.elastic.co/u/Avinash_Pattnaik)
#### Post date: [June 13, 2023, 10:01am UTC](https://discuss.elastic.co/t/how-to-use-formulas-when-creating-dashboards/335855/1 "2023-06-13T10:01:42Z")

</div>

Hello,

I am new to kibana and need a bit of help in creating a dashboard. I have the metrics i need to create a dashboard. for one of the columns, i need to use some arithmetic to determine the value of a column.

for e.g for column C, i need the value to be the difference between column A and column B. How can i do that using formula?

Here in the attached snip, i need the new column to be the difference between total size and used size.

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0e401c44c17916d1e0e3f39e468cc1a13e73a3ea.png)

---

<div class="post-metadata">

### Author: ![Avinash\_Pattnaik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/avinash_pattnaik/32/107048_2.png) [@Avinash\_Pattnaik](https://discuss.elastic.co/u/Avinash_Pattnaik)
#### Post date: [June 13, 2023, 11:58am UTC](https://discuss.elastic.co/t/how-to-use-formulas-when-creating-dashboards/335855/2 "2023-06-13T11:58:02Z")

</div>

This worked.

subtract(last\_value(cluster.disk.capacity.tb),last\_value(cluster.disk.usage.tb))

---

<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 11, 2023, 11:58am UTC](https://discuss.elastic.co/t/how-to-use-formulas-when-creating-dashboards/335855/3 "2023-07-11T11:58:41Z")

</div>

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