# Kibana Aggregation/Search Documents

**URL:** <https://discuss.elastic.co/t/kibana-aggregation-search-documents/256772>\
**Category:** Kibana\
**Created:** [November 26, 2020, 1:00pm UTC](https://discuss.elastic.co/t/kibana-aggregation-search-documents/256772 "2020-11-26T13:00:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atul\_Gunjal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_gunjal/32/57232_2.png) [@Atul\_Gunjal](https://discuss.elastic.co/u/Atul_Gunjal)\
**Post date:** [November 26, 2020, 1:01pm UTC](https://discuss.elastic.co/t/kibana-aggregation-search-documents/256772/1 "2020-11-26T13:01:00Z")

</div>

Hi,  
I want to list the members which are active. It is possible that member's new status is inactive but previously it was active. How can I create data table with such visualisation so that I will not see member whose recent status is inactive?

Example.

```auto
{
"name":"member1",
 "status":"active"
}
{
"name":"member2",
"status":"active"
}
{
"name":"member1",
"status":"inactive"
}

```

Now in datatable I only want to show member2 as his status is active and member1 is inactive.  
Any help will be useful.

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [November 26, 2020, 4:48pm UTC](https://discuss.elastic.co/t/kibana-aggregation-search-documents/256772/2 "2020-11-26T16:48:44Z")

</div>

Hi,

can you have multiple documents that state that member one is active like:

```auto
{ id: 0, name: 'member1', status: 'active'}
{ id: 1, name: 'member1', status: 'active'}
{ id: 2, name: 'member1', status: 'inactive'}
{ id: 3, name: 'member1', status: 'active'}

```

or you have at max 2 document per member name?

Does the status can be come active again?  
And final question: does the current status depends on time? like the last status in a specified time range is the current one?

---

<div class="post-metadata">

**Author:** ![Atul\_Gunjal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atul_gunjal/32/57232_2.png) [@Atul\_Gunjal](https://discuss.elastic.co/u/Atul_Gunjal)\
**Post date:** [November 27, 2020, 4:00am UTC](https://discuss.elastic.co/t/kibana-aggregation-search-documents/256772/3 "2020-11-27T04:00:08Z")

</div>

@markov00 Yes, I can have multiple documents for any member based on the time when he comes active or be inactive and the status of the member can be changed or he can be active again.

---

<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:** [December 25, 2020, 4:00am UTC](https://discuss.elastic.co/t/kibana-aggregation-search-documents/256772/4 "2020-12-25T04:00:22Z")

</div>

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