# Create views on statuses with math

**URL:** <https://discuss.elastic.co/t/create-views-on-statuses-with-math/311327>\
**Category:** Kibana\
**Created:** [August 3, 2022, 3:36pm UTC](https://discuss.elastic.co/t/create-views-on-statuses-with-math/311327 "2022-08-03T15:36:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Murali\_Y](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/murali_y/32/98137_2.png) [@Murali\_Y](https://discuss.elastic.co/u/Murali_Y)\
**Post date:** [August 3, 2022, 3:36pm UTC](https://discuss.elastic.co/t/create-views-on-statuses-with-math/311327/1 "2022-08-03T15:36:42Z")

</div>

Hello all,  
I am newbie to Kibana. I am trying to create table or view for below condition:

1. In our logs we are writing below info:  
"Status": 100 for pass  
"Status": 200 for fail  
"Status": 300 for stuck due to issue

So sum of all 3 above statuses will give my total transactions i.e. Status 100 + 200 + 300

1. I need to create below view:

Successful execution % = Status:100/(Status:100 + Status:200 + Status:300) \* 100

Can you please guide me in achieving this?

Thanks.

---

<div class="post-metadata">

**Author:** ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)\
**Post date:** [August 3, 2022, 4:06pm UTC](https://discuss.elastic.co/t/create-views-on-statuses-with-math/311327/2 "2022-08-03T16:06:07Z")

</div>

This looks like a great use case for [Lens formula](https://www.elastic.co/guide/en/kibana/current/lens.html#lens-formulas)!

You could also try to use a [scriped field](http://elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html)

---

<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:** [August 31, 2022, 4:07pm UTC](https://discuss.elastic.co/t/create-views-on-statuses-with-math/311327/3 "2022-08-31T16:07:00Z")

</div>

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