Splunk Search

How can I convert integer to decimal?

isac_santana
Explorer

Good Morning,
I'm having trouble converting a whole number to a decimal. 



Example:

 

 

| eval Amount = round(tonumber(balance_amount), 2)
Result: 814118225.00

 

 



But I need the number to look like:  8141182.25

Labels (1)
0 Karma
1 Solution

Manasa_401
Communicator

Hello @isac_santana 

If you want to convert an integer number to decimal, try dividing the number as shown below

| eval Amount = balance_amount/100

If this helps an upvote would be appreciated.

Thanks,

Manasa

View solution in original post

0 Karma

Manasa_401
Communicator

Hello @isac_santana 

If you want to convert an integer number to decimal, try dividing the number as shown below

| eval Amount = balance_amount/100

If this helps an upvote would be appreciated.

Thanks,

Manasa

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