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 Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...