# Using formula section on the vertical axis

**URL:** <https://discuss.elastic.co/t/using-formula-section-on-the-vertical-axis/305410>\
**Category:** Kibana\
**Created:** [May 23, 2022, 2:49pm UTC](https://discuss.elastic.co/t/using-formula-section-on-the-vertical-axis/305410 "2022-05-23T14:49:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![behappy\_alwayz0401](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/behappy_alwayz0401/32/105988_2.png) [@behappy\_alwayz0401](https://discuss.elastic.co/u/behappy_alwayz0401)\
**Post date:** [May 23, 2022, 2:49pm UTC](https://discuss.elastic.co/t/using-formula-section-on-the-vertical-axis/305410/1 "2022-05-23T14:49:49Z")

</div>

Hi,  
I want to show the count as a percentage. Currently it is displaying the count of files. How do I show the count as a percentage of the total number of files in the formula section of the vertical axis. attached screenshot.  
 ![Picture1](https://us1.discourse-cdn.com/elastic/original/3X/8/a/8a789c160e42421bb0d4bd6cb1941154de511276.png)

thanks

---

<div class="post-metadata">

**Author:** ![behappy\_alwayz0401](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/behappy_alwayz0401/32/105988_2.png) [@behappy\_alwayz0401](https://discuss.elastic.co/u/behappy_alwayz0401)\
**Post date:** [May 23, 2022, 2:59pm UTC](https://discuss.elastic.co/t/using-formula-section-on-the-vertical-axis/305410/2 "2022-05-23T14:59:39Z")

</div>

Can you write formula on a scripted field?

---

<div class="post-metadata">

**Author:** ![Stratoula\_Kalafateli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stratoula_kalafateli/32/70923_2.png) [@Stratoula\_Kalafateli](https://discuss.elastic.co/u/Stratoula_Kalafateli)\
**Post date:** [May 23, 2022, 4:01pm UTC](https://discuss.elastic.co/t/using-formula-section-on-the-vertical-axis/305410/3 "2022-05-23T16:01:22Z")

</div>

You can use this formula

```auto
count() / overall_sum(count())

```

Overall functions were introduced in 7.14 [https://github.com/elastic/kibana/pull/99461](https://github.com/elastic/kibana/pull/99461)

You can change the value format to percent if you want to have the axis to a percent format

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/1/01d592a9ccefdb5cf0e8c62809ad088679d2bcbb.png)

Scripted fields support math calculations but not formula as it is in Lens

---

<div class="post-metadata">

**Author:** ![behappy\_alwayz0401](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/behappy_alwayz0401/32/105988_2.png) [@behappy\_alwayz0401](https://discuss.elastic.co/u/behappy_alwayz0401)\
**Post date:** [May 24, 2022, 5:09am UTC](https://discuss.elastic.co/t/using-formula-section-on-the-vertical-axis/305410/4 "2022-05-24T05:09:30Z")

</div>

Thanks a lot!

---

<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 21, 2022, 5:09am UTC](https://discuss.elastic.co/t/using-formula-section-on-the-vertical-axis/305410/5 "2022-06-21T05:09:44Z")

</div>

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