Show latest values for every unique value


(D S) #1

Hello! I have information for a set of machines and I am trying to display only the latest values for various fields for each unique serial number. So for ex if I have:
serial# 1, temp: 100, color: red, date: 7/1/2018
serial# 1, temp: 100, color: red, date: 7/2/2018
serial# 1, temp: 100, color: red, date: 7/3/2018
serial# 2, temp: 99, color: blue, date: 7/1/2018
serial# 2, temp: 99, color: blue, date: 7/2/2018
serial# 2, temp: 99, color: blue, date: 7/3/2018

then my table should only show:
serial# 1, temp: 100, color: red, date: 7/3/2018
serial# 2, temp: 99, color: blue, date: 7/3/2018

Since serial 1 and 2 are unique and the 3rd of July is the most recent date.
Is this possible?


(Jon Budzenski) #2

Hey, can do. Terms on serial number and then you're looking for the top hits metric with a size of 1 sorted on your date field for the other columns.

Top hits lets you grab n values in a bucket and take the min, max, concatenation, or sum of them. Sorting by date with a size of one will give us the most recent number.


(D S) #3

Thank you very much for the reply!
This works but I was trying to make a table of the information. Do you happen to know if there is any way to do that (sorry I should have specified that in the original question).


(Jon Budzenski) #4

Oh sorry about that, yes on more recent versions of Kibana. Which version of Kibana are you running? The data table visualization would have it at


(D S) #5

Thank you so much! That was exactly what I needed ^.^


(system) #6

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