# Datatable with only the last results on a certain term?

**URL:** https://discuss.elastic.co/t/datatable-with-only-the-last-results-on-a-certain-term/223486
**Category:** Kibana
**Created:** [March 13, 2020, 10:08am UTC](https://discuss.elastic.co/t/datatable-with-only-the-last-results-on-a-certain-term/223486 "2020-03-13T10:08:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Marco\_Pas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_pas/32/45638_2.png) [@Marco\_Pas](https://discuss.elastic.co/u/Marco_Pas)
#### Post date: [March 13, 2020, 10:08am UTC](https://discuss.elastic.co/t/datatable-with-only-the-last-results-on-a-certain-term/223486/1 "2020-03-13T10:08:28Z")

</div>

Hi there, i am trying to visualize a datatable that contains documents but i only want to display the latest rows per for example "project-code"..

![Screenshot 2020-03-13 at 10.34.18](https://us1.discourse-cdn.com/elastic/original/3X/0/e/0e642fc0d69a1dd7a0e60a3bc9fd09147d0794c4.png)

Any hint on how to achieve this?

I tried to set a x-axis metric based on a 'top-hit' but this has no effect.  
Any suggestions are appriciated!

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [March 13, 2020, 12:54pm UTC](https://discuss.elastic.co/t/datatable-with-only-the-last-results-on-a-certain-term/223486/2 "2020-03-13T12:54:02Z")

</div>

This is the way to do it. Only difference is that you should use the Date field instead of the @timestamp, judging by your screenshot there.

> [@Display latest value in a „Metric“](https://discuss.elastic.co/t/display-latest-value-in-a-metric/114930):
>
> Hi there, I would like to display the latest value of a given index in a dashboard with a „Metric“. This should happen in a aws instance of Kibana. Is it possible to do this? The aggregation of the metric inside „Metric“ only shows me stuff like „Count“, „Average“ or „Sum“ but not „Latest“. I wonder if this is possible with the Metric visualisation.

---

<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: [April 10, 2020, 12:54pm UTC](https://discuss.elastic.co/t/datatable-with-only-the-last-results-on-a-certain-term/223486/3 "2020-04-10T12:54:13Z")

</div>

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