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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...