Splunk Search

Can I use data from other rows and set them to a different row who have the same key?

yoshilog
Explorer

Hi everyone, 

I would like to ask if it's possible to use data from another row, to be set as the value of a different row with the same key... Such as in the table below. 

idusernamestatus
XC2345 completed
XC2345 in progress
XC2345killjoystarted
ZC9999 in progress
ZC9999jettstarted

 

In the example above, I would like to set the values for usernames of each row with the same id to the same as the one with values, for them to become like this: 

idusernamestatus
XC2345killjoycompleted
XC2345killjoyin progress
XC2345killjoystarted
ZC9999jettin progress
ZC9999jettstarted

 

Would above be possible through eval or another function? 

Labels (1)
0 Karma
1 Solution

manjunathmeti
Champion

hi @yoshilog,
Yes, you can use event stats with the last function.

your_Search | eventstats last(username) as username by id

 

If this reply helps you, an upvote/like would be appreciated.

View solution in original post

manjunathmeti
Champion

hi @yoshilog,
Yes, you can use event stats with the last function.

your_Search | eventstats last(username) as username by id

 

If this reply helps you, an upvote/like would be appreciated.

yoshilog
Explorer

Thank you. It worked.

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...