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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...