# Mathematics calculations with daily data records

**URL:** https://discuss.elastic.co/t/mathematics-calculations-with-daily-data-records/245320
**Category:** Kibana
**Created:** [August 17, 2020, 10:31pm UTC](https://discuss.elastic.co/t/mathematics-calculations-with-daily-data-records/245320 "2020-08-17T22:31:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![MyQuery](https://avatars.discourse-cdn.com/v4/letter/m/839c29/32.png) [@MyQuery](https://discuss.elastic.co/u/MyQuery)
#### Post date: [August 17, 2020, 10:31pm UTC](https://discuss.elastic.co/t/mathematics-calculations-with-daily-data-records/245320/1 "2020-08-17T22:31:16Z")

</div>

Hi Team,

We would like to build table in the below format . Data is coming as record by record..

| Marketing | Operating | Count | Total | AF | FL | Total(%) | AF(%) | FL(%) |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| UA | UA | 9415 | 24 | 17 | 7 | 0.25 | 0.18 | 0.07 |
| UA | LH | 47 | 6 | 6 | 0 | 12.77 | 12.77 | 0 |

We are able to create below format using data-table

| Marketing | Operating | Count | Total | AF | FL |
| --- | --- | --- | --- | --- | --- |
| UA | UA | 9415 | 24 | 17 | 7 |
| UA | LH | 47 | 6 | 6 | 0 |

Percentages should be calculated w.r.t Count

We tried with scripted fields for calculating percentage, but couldn't calculate percentage and we got to know that scripted fields are calculated for each document due to which we couldn't achieve it.

Please refer below for more details - [Division in Scripted field](https://discuss.elastic.co/t/division-in-scripted-field/244715)

Our current version of kibana is 7.4.2. Could you please suggest best possible way to implement this.

Also do let us know if we can achieve this by taking latest kibana version.

---

<div class="post-metadata">

### Author: ![myasonik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/myasonik/32/62369_2.png) [@myasonik](https://discuss.elastic.co/u/myasonik)
#### Post date: [August 20, 2020, 10:38pm UTC](https://discuss.elastic.co/t/mathematics-calculations-with-daily-data-records/245320/2 "2020-08-20T22:38:39Z")

</div>

Hi @MyQuery!

Unfortunately, this isn't possible within Kibana today.

You can create a "percentage column" for an individual column under the options tab for the table but that's as close as we can get you to the table you're looking for.

---

<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: [September 17, 2020, 10:38pm UTC](https://discuss.elastic.co/t/mathematics-calculations-with-daily-data-records/245320/3 "2020-09-17T22:38:44Z")

</div>

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