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!

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 ...