# Associate events with a common field (in order to obtain duration, throughput, ...)

**URL:** <https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739>\
**Category:** Kibana\
**Created:** [April 1, 2019, 8:55am UTC](https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739 "2019-04-01T08:55:37Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [April 1, 2019, 4:51pm UTC](https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739/2 "2019-04-01T16:51:42Z")

</div>

Unfortunately, there does not appear to be an aggregation in Elasticsearch that can compute duration between documents. So there is no way to do this in Kibana.

Computing the duration as a field in the document (such as using the `elapsed` function in Logstash) is the best way to do this.

There is more background information in this thread. [How to find correlated messages and time between them](https://discuss.elastic.co/t/how-to-find-correlated-messages-and-time-between-them/129775)

---

_[View the full topic](https://discuss.elastic.co/t/associate-events-with-a-common-field-in-order-to-obtain-duration-throughput/174739)._
