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!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...