Archive

Need query of sum of distinct count.

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

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
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!