# How can I show the value of a specific field from the most recent document in a time frame

**URL:** <https://discuss.elastic.co/t/how-can-i-show-the-value-of-a-specific-field-from-the-most-recent-document-in-a-time-frame/335964>\
**Category:** Kibana\
**Created:** [June 14, 2023, 9:29am UTC](https://discuss.elastic.co/t/how-can-i-show-the-value-of-a-specific-field-from-the-most-recent-document-in-a-time-frame/335964 "2023-06-14T09:29:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harold\_Van\_der\_Veken](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harold_van_der_veken/32/113858_2.png) [@Harold\_Van\_der\_Veken](https://discuss.elastic.co/u/Harold_Van_der_Veken)\
**Post date:** [June 14, 2023, 9:29am UTC](https://discuss.elastic.co/t/how-can-i-show-the-value-of-a-specific-field-from-the-most-recent-document-in-a-time-frame/335964/1 "2023-06-14T09:29:12Z")

</div>

I have an ingest of logs where 1 field gets updated each time. Let say every minute I receive a logline and the count field holds certain value.  
In Kibana I can select for example the last hour as timeframe. Now I would like to show the value of the count field of the last logged line. (i.e the last document stored in elastic). How can I do this?

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [June 14, 2023, 10:16am UTC](https://discuss.elastic.co/t/how-can-i-show-the-value-of-a-specific-field-from-the-most-recent-document-in-a-time-frame/335964/2 "2023-06-14T10:16:19Z")

</div>

Hi @Harold_Van_der_Veken

have you tried to use `Last value` with the Legacy Metric visualization?

 ![Screenshot 2023-06-14 at 12.15.41](https://us1.discourse-cdn.com/elastic/original/3X/d/7/d7cbc4dc51d43f8a698681146c5f50252dc33572.jpeg)

---

<div class="post-metadata">

**Author:** ![Harold\_Van\_der\_Veken](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/harold_van_der_veken/32/113858_2.png) [@Harold\_Van\_der\_Veken](https://discuss.elastic.co/u/Harold_Van_der_Veken)\
**Post date:** [June 14, 2023, 11:22am UTC](https://discuss.elastic.co/t/how-can-i-show-the-value-of-a-specific-field-from-the-most-recent-document-in-a-time-frame/335964/3 "2023-06-14T11:22:40Z")

</div>

I'm using kibana 8.5.3. How or where can I add this legacy visualization?

---

<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:** [July 12, 2023, 11:22am UTC](https://discuss.elastic.co/t/how-can-i-show-the-value-of-a-specific-field-from-the-most-recent-document-in-a-time-frame/335964/4 "2023-07-12T11:22:52Z")

</div>

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