Splunk Search

Percentile calculation

chaitu99
Explorer

source="file.txt" | transaction startswith="message1" endswith="message2" | stats count values(duration) as DUR

log file 5 events are matching

count DUR
5 0.095
0.056
0.075
0.064
0.095

I want to calculate the percentage of all events duration coming which is less than 75 miliseconds.

Please let me know how to go ahead.

Tags (1)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

You could replace your stats with something like this:

... | stats count as total count(eval(duration<0.075)) as count | eval percentage = count * 100 / total

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

You could replace your stats with something like this:

... | stats count as total count(eval(duration<0.075)) as count | eval percentage = count * 100 / total
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...