# How to sum two metric inside a data table

**URL:** <https://discuss.elastic.co/t/how-to-sum-two-metric-inside-a-data-table/166944>\
**Category:** Kibana\
**Created:** [February 4, 2019, 11:22am UTC](https://discuss.elastic.co/t/how-to-sum-two-metric-inside-a-data-table/166944 "2019-02-04T11:22:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattbc](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@mattbc](https://discuss.elastic.co/u/mattbc)\
**Post date:** [February 4, 2019, 11:22am UTC](https://discuss.elastic.co/t/how-to-sum-two-metric-inside-a-data-table/166944/1 "2019-02-04T11:22:12Z")

</div>

Hello,

I've started to work with Kibana this week to make some graphs with the data I do have from Google Analytics. I'm trying to make a few calculations based on the columns that I already have in my visualizations without luck.

My main goal is to get this three calculations:

Conversion rate : 100 / (sessions/transactions)  
Session value: revenue / sessions  
Avg. order value: revenue / transactions

My current data table looks like this:

 ![09](https://us1.discourse-cdn.com/elastic/original/3X/7/d/7d0ff04b096dcb29ae034fd99671b1b61a6f7d42.png)

I've tried with scripted fields and bucket aggregations but didn't get what I was expecting. Any clue on how to make it? Thank you!

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [February 5, 2019, 7:45pm UTC](https://discuss.elastic.co/t/how-to-sum-two-metric-inside-a-data-table/166944/2 "2019-02-05T19:45:57Z")

</div>

Have you tried using Canvas? That will allow you to manipulate the aggregation results

---

<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:** [March 5, 2019, 7:46pm UTC](https://discuss.elastic.co/t/how-to-sum-two-metric-inside-a-data-table/166944/3 "2019-03-05T19:46:01Z")

</div>

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