Splunk Search

Need query of sum of distinct count.

pinpra
New Member

I need sum of distinct count for following condition :

distinct_count(email_id) where event_name=email and distinct_count(person_id) where event_name=push.

Please suggest.

Thanks in advance for help.

0 Karma

cmerriman
Super Champion

how about something like this:

|eval emailDC=if(event_name=email,email_id,null())|eval personDC=if(event_name=push,person_id,null())|stats dc(emailDC) as emailDC dc(personDC) as personDC
0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

 Prepare to elevate your security operations with the powerful upgrade to Splunk Enterprise Security 8.x! This ...

Get Early Access to AI Playbook Authoring: Apply for the Alpha Private Preview ...

Passionate about security automation? Apply now to our AI Playbook Authoring Alpha private preview ...

Reduce and Transform Your Firewall Data with Splunk Data Management

Managing high-volume firewall data has always been a challenge. Noisy events and verbose traffic logs often ...