# Ability to reference time range bucket From: and To: in query/visualisation?

**URL:** <https://discuss.elastic.co/t/ability-to-reference-time-range-bucket-from-and-to-in-query-visualisation/84915>\
**Category:** Kibana\
**Created:** [May 8, 2017, 10:13am UTC](https://discuss.elastic.co/t/ability-to-reference-time-range-bucket-from-and-to-in-query-visualisation/84915 "2017-05-08T10:13:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeeSyd](https://avatars.discourse-cdn.com/v4/letter/l/8dc957/32.png) [@LeeSyd](https://discuss.elastic.co/u/LeeSyd)\
**Post date:** [May 8, 2017, 10:13am UTC](https://discuss.elastic.co/t/ability-to-reference-time-range-bucket-from-and-to-in-query-visualisation/84915/1 "2017-05-08T10:13:25Z")

</div>

I have indexed documents containing a person's "arrivalTime" and "departureTime". What I'd like to show is the number of people in attendance at a given time, so for each bucket, it would display a count of all documents where (arrivalTime \<= Bucket From:)  
AND  
(departureTime does not exist or \> Bucket To:)

Is this possible in Kibana? Filters? But how would I reference the bucket time in a filter query?

I'd be looking at implementing in a either a Line chart of Vertical Column chart with Date Histogram X Axis.

Thanks,

Lee

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [May 8, 2017, 2:00pm UTC](https://discuss.elastic.co/t/ability-to-reference-time-range-bucket-from-and-to-in-query-visualisation/84915/2 "2017-05-08T14:00:50Z")

</div>

Hi Lee, can you please check this post and see if it helps you?

> [@Display concurrency in data on Kibana](https://discuss.elastic.co/t/display-concurrency-in-data-on-kibana/26006):
>
> I have fields with start date and duration (seconds) representing start and duration of a phone call. I would like to define concurrency (a number) when the same destination (also a field) is active within the same duration. That is if a ncall starts now for 30 seconds and another call to the same destination starts 15 seconds into the first call, concurrency should be 2 for the remaining 15 seconds. How do I define this in Kibana visualization as a line graph over time?

Regards,  
Lee

---

<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:** [June 5, 2017, 2:05pm UTC](https://discuss.elastic.co/t/ability-to-reference-time-range-bucket-from-and-to-in-query-visualisation/84915/3 "2017-06-05T14:05:56Z")

</div>

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