- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
msarro
Builder
02-01-2011
08:18 PM
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.
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

jrodman

Splunk Employee
02-01-2011
08:50 PM
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)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

jrodman

Splunk Employee
02-01-2011
08:50 PM
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)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
msarro
Builder
02-03-2011
02:24 PM
That's the solution i ended up using. Thanks!
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
msarro
Builder
02-01-2011
08:49 PM
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.
