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!

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 ...