Splunk Search

Pick latest event

aleem
SplunkTrust
SplunkTrust

Hi,
I want only return the latest event

The following seems to work so far. It is correct? No entirely sure what the sort criteria for Top is

Top limit=1 Color,TimeStamp,Bank,DX | table Color

Be the best version of you
Tags (1)
0 Karma
1 Solution

Stephen_Sorkin
Splunk Employee
Splunk Employee

No. The "top" command is used to find the most frequent value of the field specified, here you specify 4 fields, so we return the most common combination of these four fields.

You are looking for the "head" command: ... | head 1 | ...

View solution in original post

0 Karma

Stephen_Sorkin
Splunk Employee
Splunk Employee

No. The "top" command is used to find the most frequent value of the field specified, here you specify 4 fields, so we return the most common combination of these four fields.

You are looking for the "head" command: ... | head 1 | ...

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...