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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...