Splunk Search

How to get a dc on 2 fields?

mgao
Engager

I have two fields, "sender" and "recipient". I want to create a table that lists distinct sender-recipient pairs and the corresponding # of events for each pair. I can't think of how to use stats dc or dedup to do this. Any ideas?

Tags (2)
0 Karma
1 Solution

pradeepkumarg
Influencer
| stats count by sender recepient  

or

| eval sender_recepient = sender."-".recepient | stats count by sender_recepient  

View solution in original post

somesoni2
Revered Legend

How about this? This should give you "list of distinct sender-recipient pairs and the corresponding # of events for each pair"

YOur current search with field sender and recipient
| stats count by sender recipient

pradeepkumarg
Influencer
| stats count by sender recepient  

or

| eval sender_recepient = sender."-".recepient | stats count by sender_recepient  
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

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