Splunk Search

How to calculate sum (distinct_count by column1) and display as a number in visualization?

waghuldese1
New Member

I have a stats calculated using :

stats distinct_count(c1) by c2

Now I want to calculate the sum of these distinct_counts and display as a single number.

Tags (1)
0 Karma
1 Solution

Vijeta
Influencer

@waghuldese1

<your query>| stats distinct_count(c1) as dc by c2| stats sum(dc) as sum

View solution in original post

Vijeta
Influencer

@waghuldese1

<your query>| stats distinct_count(c1) as dc by c2| stats sum(dc) as sum
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

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

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...