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)
---
What goes around comes around. If it helps, hit it with Karma 🙂

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)
---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

New This Month - Observability Updates Give Extended Visibility and Improve User ...

This month is a collection of special news! From Magic Quadrant updates to AppDynamics integrations to ...

Intro to Splunk Synthetic Monitoring

In our last post, we mentioned that the 3 key pieces of observability – metrics, logs, and traces – provide ...