Splunk Search

How to get the latest entry from a lookup table?

mcram52
New Member

I'm creating a chart which includes the use of a lookup table file, but I only want it to pull up the latest entry for a field. How would I do this? So far I just have this:

| lookup Packaging_User_Targets.csv Username as username OUTPUT Daily_Individual_Goal as Target
| fields username Completed Target

Right now this is pulling up all the 'Target' results for that user, including previous days, but I only want it to include the results from that day. Sorry if this is a repeat, I'm new and having a hard time trying to use answers from different situations.

Tags (4)
0 Karma

woodcock
Esteemed Legend

The easiest way is to create a time-based lookup definition against your existing lookup file:

https://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Defineatime-basedlookupinSplunkWeb

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...