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!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...