Splunk Search

Getting average times for user defined categories

RVDowning
Contributor

stats count as #PlanOpen,
count(eval(NumRows < 50)) as SmallPlans ,
count(eval(NumRows>=50 AND NumRows <200)) as MediumPlans,
count(eval(NumRows >=200)) as LargePlans

With a query such as above and a field SecsElapsed in each row, is there a way to get the average of that field for each category, namely SmallPlans, MediumPlans and LargePlans?

Tags (2)
0 Karma

RVDowning
Contributor

Have no idea if that is what you meant or not.

0 Karma

cpeteman
Contributor

Can you change this so the code is formatted please? Thanks 🙂

0 Karma

RVDowning
Contributor

Ok, I think I have this. I was just in syntax hell.

0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...