Splunk Search

How to search the average of one field by values of another field, then chart them side by side?

jasoholt
Engager

I am very new to Splunk and trying to learn manipulation like I would in Excel. My current task is to get an average of a result, and then display it by a device type. Let's assume the CSV looks like this:

DEVICE, RATIO
iphone, 20
iphone, 10
iphone, 15
samsung, 30
samsung, 12
samsung, 83

I want to get the average of the Ratios, by Device Type. And then Chart them side by side.

iphone 15
samsung 42

0 Karma

renjith_nair
Legend

Try this

your search |stats avg(RATIO) by DEVICE

OR

    your search |eventstats avg(RATIO) by DEVICE

If you want to repeat the values in each row

---
What goes around comes around. If it helps, hit it with Karma 🙂

renjith_nair
Legend

@jasoholt, please accept as 'answer' if it resolves your issue so that the thread will be closed

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...