Splunk Search

How to add a column of averages to a timechart?

JLIVE101
Engager

Similar to how timechart sum() by ip | addtotals which adds a "Totals" Column to a timechart, how can you add an averages column?

0 Karma

somesoni2
Revered Legend

I don't think there is a native way to get that. Try this workaround

... timechart sum(..) by ip | eval count=0 | foreach * [eval count=count+1] | addtotals | eval Average=Totals/count
0 Karma

jhayIV
Engager

This worked perfect for me

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...