Splunk Search

Percent search

aalaa
Path Finder

Hello ,

I have a table, each line of this table has a specific value, I need a search command to calculate the percentage of each line on the sum of these values .

Any help please ?
Thanks

Tags (1)
0 Karma
1 Solution

harsmarvania57
Ultra Champion

Hi,

Please try below query, replace <fieldname> with actual fieldname.

<yourBaseSearch>
| eventstats sum(<fieldname>) as total
| eval percentage=(<fieldname>/total)*100

View solution in original post

harsmarvania57
Ultra Champion

Hi,

Please try below query, replace <fieldname> with actual fieldname.

<yourBaseSearch>
| eventstats sum(<fieldname>) as total
| eval percentage=(<fieldname>/total)*100

aalaa
Path Finder

it's work ! thanks

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...