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!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...