# Top Hit Aggregation in Data Table showing Undefined for all bools

**URL:** <https://discuss.elastic.co/t/top-hit-aggregation-in-data-table-showing-undefined-for-all-bools/212866>\
**Category:** Kibana\
**Created:** [December 23, 2019, 4:07pm UTC](https://discuss.elastic.co/t/top-hit-aggregation-in-data-table-showing-undefined-for-all-bools/212866 "2019-12-23T16:07:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zebra](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@Zebra](https://discuss.elastic.co/u/Zebra)\
**Post date:** [December 23, 2019, 4:07pm UTC](https://discuss.elastic.co/t/top-hit-aggregation-in-data-table-showing-undefined-for-all-bools/212866/1 "2019-12-23T16:07:18Z")

</div>

I'm trying to get the most recent value of a boolean field in a data table. To do this I'm using the Top Hit aggregation with my field, aggregating with concatenate, a size of 1 and sorted on a timestamp. When I do this the column I expect to show the value of the booleans shows undefined for every row. Looking at the events in discover this field is never undefined. Does this type of aggregation not work with booleans? I am using Kibana 7.4.1.

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [December 24, 2019, 1:25am UTC](https://discuss.elastic.co/t/top-hit-aggregation-in-data-table-showing-undefined-for-all-bools/212866/2 "2019-12-24T01:25:09Z")

</div>

Hello,

I am not sure if I get this question. What is the concatenate here?  
I also think top aggregates don't work with boolean. I will try to get an definite answer.

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![Zebra](https://avatars.discourse-cdn.com/v4/letter/z/c0e974/32.png) [@Zebra](https://discuss.elastic.co/u/Zebra)\
**Post date:** [December 24, 2019, 2:31am UTC](https://discuss.elastic.co/t/top-hit-aggregation-in-data-table-showing-undefined-for-all-bools/212866/3 "2019-12-24T02:31:21Z")

</div>

I'm new to Kibana so I'm not entirely sure, but according to this post ([Display latest value in a „Metric“](https://discuss.elastic.co/t/display-latest-value-in-a-metric/114930)), that aggregation should return the most recent value of a field. If this doesn't work with boolean then do you know another way to get that data?

---

<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:** [January 21, 2020, 2:31am UTC](https://discuss.elastic.co/t/top-hit-aggregation-in-data-table-showing-undefined-for-all-bools/212866/4 "2020-01-21T02:31:22Z")

</div>

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