Splunk Search

how to format numbers ina simpleresultstable?

sou128
Explorer

currently my simpletresultstable is showing

myDecimalfield1 | myNumfield1 | MyCalculatedField1

1234.56789 | 1 | 1234.56789 <--- myDecimalfield1 divided by myNumfield1

how can I format myDecimalfield1 and MyCalculatedField1 to show only 2 decimal places? thx

0 Karma
1 Solution

sdaniels
Splunk Employee
Splunk Employee

Use eval with round().

| eval myField = round(myNumField1 ,2)

http://docs.splunk.com/Documentation/Splunk/4.3.2/SearchReference/CommonEvalFunctions

Then is display the new field (myField) in your table.

View solution in original post

sdaniels
Splunk Employee
Splunk Employee

Use eval with round().

| eval myField = round(myNumField1 ,2)

http://docs.splunk.com/Documentation/Splunk/4.3.2/SearchReference/CommonEvalFunctions

Then is display the new field (myField) in your table.

Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...