Splunk Search

How to find out difference between two fields and their tables?

rakeshksingh
New Member

Hi All,

I have two fields which consists of data of 48 hours and 24 hours, but couldn't able to find the difference which data is present in 48 hours but not in 24 hours ?

I tried with where command but unlock as data which is represent in table is from splunk query and not equal a=a. it is like

table A
a
b
c
e
d

table B
a
c
d
b

Could you please help me in how to find which data is not present in table b ? as like is e is not present in above scenario ?

0 Karma

somesoni2
Revered Legend

It seems like the fieldA is a multivalued field, so try something like this

search command earliest=7d|table fieldA | mvexpand fieldA | eval from="Search1" 
|append [search command earliest=2d|table fieldA | mvexpand fieldA | eval from="Search2" ]
| stats values(from) as from by fieldA 
| where mvcount(from)=1 AND from="Search1"
0 Karma

somesoni2
Revered Legend

Is your field a multivalued field? What your query that generating those values?

0 Karma

rakeshksingh
New Member

Thanks SomeSoni for your response. My query is something like this
search command earliest=7d|table field A|appendcols[search command earliest=2d|table field A]

If you can help me on this that would be grateful.

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...