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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...