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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...