Splunk Search

InputLookup - find unique values across 4 fields

brdr
Contributor

I have a lookup file that contain 4 fields (field1, field2, field3, field4) which contains an account number. Same account number can exist across the different fields as well as unique account numbers in these fields. I need a search that provides a count of unique account numbers across the 4 fields (and as a separate list of events).

0 Karma

somesoni2
Revered Legend

Try this

| inputlookup yourlookup.csv | table field1 field2 field2 field4 | eval temp=1
| untable temp field AccountNumber
| stats dc(AccountNumber) as UniqueAccountNumbers
0 Karma

brdr
Contributor

Nice. Will try it out. Thanks.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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