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
Register for .conf21 Now! Go Vegas or Go Virtual!

How will you .conf21? You decide! Go in-person in Las Vegas, 10/18-10/21, or go online with .conf21 Virtual, 10/19-10/20.