Splunk Search

how to get ratio of count filtered results with condition by total grouping by month and field?

falks405
Loves-to-Learn Lots

Hello, I have the next query to get data grouped by month by software version using  condition "where"

 

 

index=tst  | spath path="Check"{} output=Num | where isnotnull(Num)
| timechart dc(run.ID) span=1mon by version | addtotals

 

 

I'm wondering how to display data grouped by month by version with condition "where isnotnull(Num)" with ratio of such number of events by total? 

tried to do this that way.

 

| dedup run.ID
| eventstats count(eval(isnotnull(Num))) as cnt, dc(run.ID) as total by version
| eval p=(cnt/total)*100
| timechart values(p) span=1mon by version

 

Labels (2)
Tags (1)
0 Karma
Get Updates on the Splunk Community!

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...