Splunk Search

How to write an eval if condition to multiply only numeric values by 100 for an alphanumeric field?

splunker9999
Path Finder

Hi,

We have a field which has both numeric values and words. We are looking to multiply all numeric values with 100.

Can some one please help?

0 Karma

sundareshr
Legend

Try this

... | eval field=if(isnum(field), field*100, field) | ...
Get Updates on the Splunk Community!

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!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...