Splunk Search

How to convert string into percentage

shravanikarale
Loves-to-Learn Lots

I want to convert a column of text values into  percentage.

STATUS
ontime
late
ontime
late
Labels (1)
0 Karma

to4kawa
Ultra Champion
| makeresults
| eval _raw="STATUS
ontime
late
ontime
late"
| multikv
| top STATUS

try top

0 Karma

shravanikarale
Loves-to-Learn Lots

But what if I don't know how many times ontime and late has occured and i have to convert it based on customer name. For example my excel sheet looks like this:

customerSTATUS
ALEXontime
CHRISlate
ALEXlate
DAVEontime
ALEXontime
CHRISontime
ALEXlate

 how can i calculate STATUS based on customer name in percentage format?

0 Karma

to4kawa
Ultra Champion

 

| makeresults
| eval _raw="customer	STATUS
ALEX	ontime
CHRIS	late
ALEX	late
DAVE	ontime
ALEX	ontime
CHRIS	ontime
ALEX	late"
| multikv forceheader=1 
| top customer STATUS

 

Well, Have you tried top? 

0 Karma
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 ...