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
Legend

@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
Legend

@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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...