# Numeric columns - opetations between columns

**URL:** <https://discuss.elastic.co/t/numeric-columns-opetations-between-columns/153298>\
**Category:** Kibana\
**Created:** [October 21, 2018, 6:54pm UTC](https://discuss.elastic.co/t/numeric-columns-opetations-between-columns/153298 "2018-10-21T18:54:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ratman](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@ratman](https://discuss.elastic.co/u/ratman)\
**Post date:** [October 21, 2018, 6:54pm UTC](https://discuss.elastic.co/t/numeric-columns-opetations-between-columns/153298/1 "2018-10-21T18:54:36Z")

</div>

Hi everyone!

I am trying to get a specific table and I need to do operations with the primary columns I am getting (like cola+colb/colc) to create a kpi. I'll try to explain it with an example.

The data I am receiving are purchases from a lot of shops, and I am trying to create a table (at shop level) in which I am creating a KPI that would be something like : (

> (visits\_that\_purchase something/clients\_entering\_to\_the\_site) \* count(distinct) (clients)

This would give me a Kpi to measure the importance of each shop and direct corrective measures towards it.  
The problem is that I am trying to do it using a table visualization but I am not sure I can do operations between columns.

Using the Visual Builder, I managed to get the % of visits that purchase something, but I cannot multiply that number \* count(distinct)(clients)...  
Also, clients and visits don't come at the same events, so it has to be done at a "shop" level.

Is there a way to do it?

Thanks!

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [October 23, 2018, 1:27am UTC](https://discuss.elastic.co/t/numeric-columns-opetations-between-columns/153298/2 "2018-10-23T01:27:48Z")

</div>

Unfortunately, there isn't any way to calculate values based on the columns in a table. There might be a way to do something similar to what you're trying with pipeline aggregations but I don't think there is any way to calculate this column today in Kibana. Something like a "calculated columns" feature in Kibana might be enough for this, if you're interested in such a feature I suggest filing a [feature request](https://github.com/elastic/kibana/issues/new?template=Feature_request.md). I would have sworn one already existed but I can't find it now...

---

<div class="post-metadata">

**Author:** ![ratman](https://avatars.discourse-cdn.com/v4/letter/r/3be4f8/32.png) [@ratman](https://discuss.elastic.co/u/ratman)\
**Post date:** [October 23, 2018, 3:19pm UTC](https://discuss.elastic.co/t/numeric-columns-opetations-between-columns/153298/3 "2018-10-23T15:19:32Z")

</div>

Hi Spencer!

I managed to do something like that in the table of the Visual Builder by using the **Math aggregation**. The only problem is that I'd like to group by two different terms but I don't think it can be done.  
But I'll fill the request for sure, thanks for the advice 🙂

Have a nice day!

---

<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:** [November 20, 2018, 3:19pm UTC](https://discuss.elastic.co/t/numeric-columns-opetations-between-columns/153298/4 "2018-11-20T15:19:33Z")

</div>

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