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!

Developer Spotlight with Paul Stout

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

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...