Splunk Search

Remove original and duplicate items from a query

francesco1g
Engager
Hi, from two columns, in order to create a report, i need to remove the elements that are present twice, not only remove the duplicates (dedup is not useful because it only removes duplicates) but also the original elements, for example:

Table A | Table B
10.10       10.2
10.21       10.32
10.2          10.3
10.60       10.21

Table C (result)
10.10
10.32
10.3
10.60



thanks for your help
Labels (1)
Tags (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

 

| eval tableC=mvappend(tableA,tableB)
| stats count by tableC
| where count=1
| fields - count

 

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

 

| eval tableC=mvappend(tableA,tableB)
| stats count by tableC
| where count=1
| fields - count

 

0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...