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 Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...