Dashboards & Visualizations

How to convert E10 notations to number?

aditsss
Motivator

Hi Team,

I am using below query to get my total closing balance

index="abc*" sourcetype=600000304_gg_abs_ipc2 " AssociationProcessor - compareTransformStatsData : statisticData: StatisticData" source="/amex/app/gfp-settlement-transform/logs/gfp-settlement-transform.log" |rex " AssociationProcessor - compareTransformStatsData : statisticData: StatisticData totalClosingBal=(?<totalClosingBal>)"|table _time  totalClosingBal| sort _time

I am getting current result as below:

7.71727634934E10

I want this E10 to be in actual numbers which can be done by below logic:

7.71727634934 × 1010

Can someone guide me how can I do this in splunk query.

Labels (2)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Assuming you have extracted the closing balance to the totalClosingBal field, you could try this

| eval bal=tonumber(mvindex(split(totalClosingBal,"E"),0)) * pow(10,tonumber(mvindex(split(totalClosingBal,"E"),1)))

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Assuming you have extracted the closing balance to the totalClosingBal field, you could try this

| eval bal=tonumber(mvindex(split(totalClosingBal,"E"),0)) * pow(10,tonumber(mvindex(split(totalClosingBal,"E"),1)))
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...