Splunk Search

issue with dividing two numbers

sravankaripe
Communicator

Hi,  Can someone help me with this.

I have fields with values  SP=3390510 and TP=3394992

I am trying to get Success percentage 

  | eval Success=(SP/TP)*100

the expected value is 99.8679% but I am value as 100.0000%

I also set precision to 0.0000 but I am not getting the expected results 

 

 

 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try a different formula

| eval Success=(SP * 100)/TP

or maybe

| eval Success=exact((SP/TP))*100

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try a different formula

| eval Success=(SP * 100)/TP

or maybe

| eval Success=exact((SP/TP))*100

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security 8.0.2 Availability: On cloud and On-premise!

A few months ago, we released Splunk Enterprise Security 8.0 for our cloud customers. Today, we are excited to ...

Logs to Metrics

Logs and Metrics Logs are generally unstructured text or structured events emitted by applications and written ...

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...