# How do i take the count of a field and perform further calculations such as division in kibana 4.3.0?

**URL:** https://discuss.elastic.co/t/how-do-i-take-the-count-of-a-field-and-perform-further-calculations-such-as-division-in-kibana-4-3-0/39863
**Category:** Kibana
**Created:** [January 22, 2016, 10:28am UTC](https://discuss.elastic.co/t/how-do-i-take-the-count-of-a-field-and-perform-further-calculations-such-as-division-in-kibana-4-3-0/39863 "2016-01-22T10:28:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![KavyaS](https://avatars.discourse-cdn.com/v4/letter/k/838e76/32.png) [@KavyaS](https://discuss.elastic.co/u/KavyaS)
#### Post date: [January 22, 2016, 10:28am UTC](https://discuss.elastic.co/t/how-do-i-take-the-count-of-a-field-and-perform-further-calculations-such-as-division-in-kibana-4-3-0/39863/1 "2016-01-22T10:28:34Z")

</div>

I need to create a chart with the following requirement: I have to take the `count` of `StatusCode` as `StatusCodeCount` and then divide it by `86400`,i.e., `count(StatusCode)/86400`. How do i do this in kibana?

I have attached the screenshot of what i've done, but i couldn't find a way to divide it by 86400.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/2/238965b56256367a1e6685765fbc67eb2701fd39.PNG)

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [January 22, 2016, 5:27pm UTC](https://discuss.elastic.co/t/how-do-i-take-the-count-of-a-field-and-perform-further-calculations-such-as-division-in-kibana-4-3-0/39863/2 "2016-01-22T17:27:47Z")

</div>

Unfortunately it isn't possible to do calculations based on counts in Kibana. If you were looking at the sum or average or some other similar operation, you could probably fake it in your data with scripted fields, but counts are absolute. At least until there is support for pipeline aggs in Kibana.

You may be able to do what you need using [Timelion](https://www.elastic.co/blog/timelion-timeline) though. The catch there is that Timelion doesn't yet support terms aggs...

---

<div class="post-metadata">

### Author: ![Jeremy\_Colton](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Jeremy\_Colton](https://discuss.elastic.co/u/Jeremy_Colton)
#### Post date: [April 11, 2016, 1:09pm UTC](https://discuss.elastic.co/t/how-do-i-take-the-count-of-a-field-and-perform-further-calculations-such-as-division-in-kibana-4-3-0/39863/3 "2016-04-11T13:09:04Z")

</div>

Hi K,

Did you find a solution? I have a similar problem of summing occurrences of text fields and then dividing them to find a rate...

Many thanks.

---

<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 6, 2017, 1:56pm UTC](https://discuss.elastic.co/t/how-do-i-take-the-count-of-a-field-and-perform-further-calculations-such-as-division-in-kibana-4-3-0/39863/4 "2017-07-06T13:56:25Z")

</div>


