Splunk Search

max of two column

vb1612
New Member

Hi , my search output is like

mysearch | table col1 col2 col3

I want col4 as max(col1,col2)

Thanks

Tags (1)
0 Karma
1 Solution

renjith_nair
SplunkTrust
SplunkTrust

@vb1612 ,

should be possible with a simple eval unless there are some hidden complexities.

|eval col4=if(col1>col2,col1,col2)
Happy Splunking!

View solution in original post

0 Karma

renjith_nair
SplunkTrust
SplunkTrust

@vb1612 ,

should be possible with a simple eval unless there are some hidden complexities.

|eval col4=if(col1>col2,col1,col2)
Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

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

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...