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!

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

  &#x1f680; 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 ...