Splunk Search

Fill field with first value

cxs6345
Engager

I have a data set for web traffic.  A sessionID ties all traffic for an individual browsing session together - all events from the time you open a new tab until you close it.  There is also a memberID field.  Some records do NOT have a value populated for memberID, so I want to return each record for the sessionID with the FIRST non-null value found in the sessionID.  For instance

timesessionIDmemberIDevalField
12:011<NULL>abc
12:021<NULL>abc
12:031abcabc
12:041<NULL>abc


Can someone help me out with how to get this evalField column?  Thanks so much!

Labels (4)
0 Karma
1 Solution

PickleRick
SplunkTrust
SplunkTrust

That's job for eventstats.

<your search>
| eventstats first(memberID) as memberID by sessionID

 

View solution in original post

PickleRick
SplunkTrust
SplunkTrust

That's job for eventstats.

<your search>
| eventstats first(memberID) as memberID by sessionID

 

Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...