Splunk Search

is there a way to compare two list columns transfer values to another column?

leirga11
New Member

i have events that has columns like this:

date1 date2
01/01/2018 01/01/2018
01/02/2018 01/26/2018
01/03/2018 03/12/2018
01/04/2018 04/1/2018
01/05/2018
01/06/2018

I want to compare them and extract same values to another column. is it possible? thanks in advance.

Tags (1)
0 Karma

493669
Super Champion

try this:

...|table date1 date2 | eval common = if(date1=date2,date1,null())

use if condition to check if it matches and if not matched then its value will be null

0 Karma

leirga11
New Member

I used this command but nothing happened.

0 Karma

493669
Super Champion

try the updated query

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...