# Scripted field with division does not show result

**URL:** https://discuss.elastic.co/t/scripted-field-with-division-does-not-show-result/97246
**Category:** Kibana
**Created:** [August 16, 2017, 11:20am UTC](https://discuss.elastic.co/t/scripted-field-with-division-does-not-show-result/97246 "2017-08-16T11:20:25Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [August 17, 2017, 5:11pm UTC](https://discuss.elastic.co/t/scripted-field-with-division-does-not-show-result/97246/6 "2017-08-17T17:11:53Z")

</div>

I would suggest the Visual Builder visualization.

Here's one post where we do a ration based on a filter;

> [@Doing Math over count of events](https://discuss.elastic.co/t/doing-math-over-count-of-events/97278/2):
>
> Here's one option if you're on a recent version of Kibana that has the Visual Builder visualization type. I know it's in 5.4.0 and later. go to the Panel Options tab and set your index pattern (here I'm using metricbeat-\*); [image] back on the Data tab select Filter Ratio [image] I picked metricset.name:process as my numerator, but yours would be something like transactionStatus:Success [image] The Gauge tab shows a single value and there some options to format as a percent, change…

But you need to sum specific values, so I think you need to do it a little different. This post uses the calculation aggregation;

> [@How to add 2 metrics visualization?](https://discuss.elastic.co/t/how-to-add-2-metrics-visualization/89017/2):
>
> If you are using 5.4 you can achieve this with the Time Series Visual Builder. [https://www.elastic.co/guide/en/kibana/current/\_featured\_visualizations.html](https://www.elastic.co/guide/en/kibana/current/_featured_visualizations.html) You can do many calculations on aggregations. For example, here is a comparison of average bytes calculated automatically vs manually: automatically: Running the calculations manually: [image]

Let me know if this works for you.

Regards,  
Lee

---

_[View the full topic](https://discuss.elastic.co/t/scripted-field-with-division-does-not-show-result/97246)._
