Splunk Search

Limiting precision

msarro
Builder

Is there any easy way to limit precision in mathematical operations with eval? I've been requested to limit everything to a maximum of two decimal places.

Tags (1)
1 Solution

jrodman
Splunk Employee
Splunk Employee

Do you want 2 digits out from it, or do you really need the internal numbers to be cut?

It has formatting operators and so on, so you can just do eg |eval field=round(.... , 2)

View solution in original post

jrodman
Splunk Employee
Splunk Employee

Do you want 2 digits out from it, or do you really need the internal numbers to be cut?

It has formatting operators and so on, so you can just do eg |eval field=round(.... , 2)

msarro
Builder

That's the solution i ended up using. Thanks!

0 Karma

msarro
Builder

I was able to implement it using the eval round() command. Thanks to anyone who looked into it for me, your help is, as always, appreciated.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...