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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...