# Aggregations and calculations

**URL:** <https://discuss.elastic.co/t/aggregations-and-calculations/80285>\
**Category:** Elasticsearch\
**Created:** [March 28, 2017, 11:20am UTC](https://discuss.elastic.co/t/aggregations-and-calculations/80285 "2017-03-28T11:20:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulius](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@paulius](https://discuss.elastic.co/u/paulius)\
**Post date:** [March 28, 2017, 11:20am UTC](https://discuss.elastic.co/t/aggregations-and-calculations/80285/1 "2017-03-28T11:20:00Z")

</div>

Hey,

I've just started using Elasticsearch + Kibana and I've come up to a problem.

I'm collecting two kind of documents at the moment which data logs are being transfered to Elasticsearch when:

1. When the website is being visited by a user (let's say the data is: website\_name, travel\_destination, price\_shown)
2. When the user purchases a ticket (let's say the data is: website\_name, travel\_destination, price\_shown, some\_custom\_data).

The question is, can I somehow calculate CR\* from these two documents and visualize it in one data table so I could do all the filtering by the website and/or travel\_destination and get it's conversion rate?

- The CR ( conversion rate ) would be count(number2event) / count(number1event) \* 100.

If anything's unclear, let me know.

Regards,  
Paulius

---

<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:** [April 25, 2017, 11:20am UTC](https://discuss.elastic.co/t/aggregations-and-calculations/80285/2 "2017-04-25T11:20:16Z")

</div>

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