# Formula for logs

**URL:** <https://discuss.elastic.co/t/formula-for-logs/54428>\
**Category:** Elasticsearch\
**Created:** [June 30, 2016, 3:28pm UTC](https://discuss.elastic.co/t/formula-for-logs/54428 "2016-06-30T15:28:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkspace](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkspace](https://discuss.elastic.co/u/dkspace)\
**Post date:** [June 30, 2016, 3:28pm UTC](https://discuss.elastic.co/t/formula-for-logs/54428/1 "2016-06-30T15:28:32Z")

</div>

Dear colleagues.

i have the configuration fluentd, ES, Kibana and amount of data with float and integer values indexed  
one simple example for logs i have :  
date1 , val1, val2.  
date2 , val11, val22.

i have to calculate for each log new value in same database (v1/v2) \*100 like below for use in the kibanas visualization this calculated result :

date1 , val1, val2, (val1/val2)\*100  
date2 , val11, val22 , (val11/val22)\*100

i know median average feature of kibana ... but it is not the case for me - i need more flexible calculation (see above example simple formula).  
Could you help me to find some method to recalculate my values. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [June 30, 2016, 6:17pm UTC](https://discuss.elastic.co/t/formula-for-logs/54428/2 "2016-06-30T18:17:53Z")

</div>

Have a look at script fields. (Please don't post the same question multiple times.)

---

<div class="post-metadata">

**Author:** ![dkspace](https://avatars.discourse-cdn.com/v4/letter/d/bc79bd/32.png) [@dkspace](https://discuss.elastic.co/u/dkspace)\
**Post date:** [July 1, 2016, 6:59am UTC](https://discuss.elastic.co/t/formula-for-logs/54428/3 "2016-07-01T06:59:41Z")

</div>

Thank you!  
i revised script field - but how to use it for kibana - do you know?  
The same question but different systems in detail ....  
(as you can see people from another categories can not help ).

---

<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 5, 2017, 10:39pm UTC](https://discuss.elastic.co/t/formula-for-logs/54428/4 "2017-07-05T22:39:02Z")

</div>


