# Data table disappears using "Top Hit" aggregation

**URL:** <https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419>\
**Category:** Kibana\
**Created:** [July 23, 2020, 11:43pm UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419 "2020-07-23T23:43:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ram2416](https://avatars.discourse-cdn.com/v4/letter/r/82dd89/32.png) [@Ram2416](https://discuss.elastic.co/u/Ram2416)\
**Post date:** [July 23, 2020, 11:43pm UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419/1 "2020-07-23T23:43:18Z")

</div>

Hi,  
I'm working on creating a data table using "Top Hit" aggregation in Kibana version 6.6.0. I'm encountering a unique problem which I'm not able to figure out.

For few of the parameters, I'm able to sort and display the latest value in the table.

When I try to add few other "Top hit" metrics, complete data table gets disappeared and numerous refresh attempts result in nothing. Only when I disable that particular aggregation(which is causing this problem), I can see the data table reappear.  
Am I doing anything wrong in this case?

Also for my data, the two different metrics have same timestamp here.  
In general, by any chance, will data for different metrics arriving at different timestamp cause a problem?

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [July 24, 2020, 12:17am UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419/2 "2020-07-24T00:17:57Z")

</div>

I had a similar issue in the past.  
Do you add the other metrics as "top hit" as well?

---

<div class="post-metadata">

**Author:** ![Ram2416](https://avatars.discourse-cdn.com/v4/letter/r/82dd89/32.png) [@Ram2416](https://discuss.elastic.co/u/Ram2416)\
**Post date:** [July 24, 2020, 12:27am UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419/3 "2020-07-24T00:27:06Z")

</div>

Yes.. I did add other metrics too with "Top Hit" aggregation.  
How did you resolve it?

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [July 24, 2020, 12:31am UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419/4 "2020-07-24T00:31:35Z")

</div>

I added all fields as metrics only, and all as top hits.  
Removed them from buckets, if you have any.

---

<div class="post-metadata">

**Author:** ![Ram2416](https://avatars.discourse-cdn.com/v4/letter/r/82dd89/32.png) [@Ram2416](https://discuss.elastic.co/u/Ram2416)\
**Post date:** [July 24, 2020, 1:30am UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419/5 "2020-07-24T01:30:55Z")

</div>

All the "Top Hits" are in metrics..  
But I need a bucket to categorize my data and apply metrics on it ..

How did you do in your case without a bucket though??

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [July 24, 2020, 1:52am UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419/6 "2020-07-24T01:52:52Z")

</div>

It depends on the use case.  
I managed to create the visual I need without buckets, or just a few.  
Some fields added to the bucket list created the issue.

I would check which fields create the issue and try to move them to the metric.  
I think this is a kind of workaround, maybe someone will know the root cause and how to solve it.

---

<div class="post-metadata">

**Author:** ![Ram2416](https://avatars.discourse-cdn.com/v4/letter/r/82dd89/32.png) [@Ram2416](https://discuss.elastic.co/u/Ram2416)\
**Post date:** [July 24, 2020, 2:16am UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419/7 "2020-07-24T02:16:28Z")

</div>

Yeah Same in my case too..Few metrics and some buckets are causing the problem..  
Hope to find a definitive solution though..Might be a bug/we're not aware of any hidden limitations using Top Hit..

Let's see if anyone from Elastic team answers it..Thanks for sharing your experience AClerk..

---

<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:** [August 21, 2020, 2:16am UTC](https://discuss.elastic.co/t/data-table-disappears-using-top-hit-aggregation/242419/8 "2020-08-21T02:16:28Z")

</div>

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