# Kibana visualization search only the latest value

**URL:** https://discuss.elastic.co/t/kibana-visualization-search-only-the-latest-value/215594
**Category:** Kibana
**Created:** [January 19, 2020, 4:50am UTC](https://discuss.elastic.co/t/kibana-visualization-search-only-the-latest-value/215594 "2020-01-19T04:50:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ashutosh\_Pachisia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashutosh_pachisia/32/45312_2.png) [@Ashutosh\_Pachisia](https://discuss.elastic.co/u/Ashutosh_Pachisia)
#### Post date: [January 19, 2020, 4:50am UTC](https://discuss.elastic.co/t/kibana-visualization-search-only-the-latest-value/215594/1 "2020-01-19T04:50:15Z")

</div>

Is there any way in kibana to search data only of the latest timestamp

I have a dataset that repeats every (10min-15 min ) not fixed interval with a different set of values  
I want the historic data as well as the latest data in the visualization .  
Please help  
Eg :  
@timestamp | locations | status  
@now. ABC. 1  
@now. DEF. 2  
@now-5min. ABC. 4  
@now-5min. DEF. 3

Final output  
@timestamp | locations | status  
@now. ABC. 1  
@now. DEF. 2

---

<div class="post-metadata">

### Author: ![kiyapedia](https://avatars.discourse-cdn.com/v4/letter/k/5fc32e/32.png) [@kiyapedia](https://discuss.elastic.co/u/kiyapedia)
#### Post date: [January 19, 2020, 12:26pm UTC](https://discuss.elastic.co/t/kibana-visualization-search-only-the-latest-value/215594/2 "2020-01-19T12:26:05Z")

</div>

Hello @Ashutosh_Pachisia —

If I understand your question correctly, you want to create a visualization that shows you both your latest data and historic data in one view? If that's the case, I suggest you create two separate visualizations: one for your historic data and one for your latest data. Then, you can add both visualizations to a dashboard two view at the same time.

Let me know if this helps.

Thanks

---

<div class="post-metadata">

### Author: ![Ashutosh\_Pachisia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashutosh_pachisia/32/45312_2.png) [@Ashutosh\_Pachisia](https://discuss.elastic.co/u/Ashutosh_Pachisia)
#### Post date: [January 20, 2020, 12:19pm UTC](https://discuss.elastic.co/t/kibana-visualization-search-only-the-latest-value/215594/3 "2020-01-20T12:19:46Z")

</div>

Hi,

No i want a metric to see only the latest data removing the duplicates

---

<div class="post-metadata">

### Author: ![kiyapedia](https://avatars.discourse-cdn.com/v4/letter/k/5fc32e/32.png) [@kiyapedia](https://discuss.elastic.co/u/kiyapedia)
#### Post date: [January 20, 2020, 9:12pm UTC](https://discuss.elastic.co/t/kibana-visualization-search-only-the-latest-value/215594/4 "2020-01-20T21:12:15Z")

</div>

Ah, in that case you will want to select unique\_count under metric aggregations and select the field of the value you’re looking for.

---

<div class="post-metadata">

### Author: ![Ashutosh\_Pachisia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashutosh_pachisia/32/45312_2.png) [@Ashutosh\_Pachisia](https://discuss.elastic.co/u/Ashutosh_Pachisia)
#### Post date: [January 22, 2020, 12:00pm UTC](https://discuss.elastic.co/t/kibana-visualization-search-only-the-latest-value/215594/5 "2020-01-22T12:00:52Z")

</div>

Hi ,  
Yes Selecting Unique\_count is ok for a particular field but what about the other data attached to the unique field which needs to be latest of all the timestamps

---

<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: [February 19, 2020, 12:00pm UTC](https://discuss.elastic.co/t/kibana-visualization-search-only-the-latest-value/215594/6 "2020-02-19T12:00:57Z")

</div>

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