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!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...