Splunk Search

Multiply value by 100.

deanamite91
Explorer

I have the following search

index="commercial_performance"  Cat1="Unit Cost Modelled Standard Activity Rate" Value!="within *" $month_token$ $Customer_token$ $SL_token$ | stats avg(Value) AS "Planned" by Cat      
| appendcols [search index="commercial_performance"  Cat1="Unit Cost Actual" Value!="within *" $month_token$ $Customer_token$ $SL_token$ | stats avg(Value) AS "Actual" by Cat]

I want to multiply 'Value' by 100. How do I do this?

Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this:

... | eval Value=Value*100 | stats avg(Value) ...

You'll need the eval command in both your main search and in the subsearch.

---
If this reply helps you, Karma would be appreciated.
0 Karma

somesoni2
Revered Legend

Try this

index="commercial_performance"  Cat1="Unit Cost Modelled Standard Activity Rate" Value!="within *" $month_token$ $Customer_token$ $SL_token$  | eval Value=Value*100 | stats avg(Value) AS "Planned" by Cat      
 | appendcols [search index="commercial_performance"  Cat1="Unit Cost Actual" Value!="within *" $month_token$ $Customer_token$ $SL_token$ | eval Value=Value*100 | stats avg(Value) AS "Actual" by Cat]

OR

index="commercial_performance"  Cat1="Unit Cost Modelled Standard Activity Rate" Value!="within *" $month_token$ $Customer_token$ $SL_token$ | stats avg(Value) AS "Planned" by Cat      
 | appendcols [search index="commercial_performance"  Cat1="Unit Cost Actual" Value!="within *" $month_token$ $Customer_token$ $SL_token$ | stats avg(Value) AS "Actual" by Cat] | eval Planned=Planned*100 | eval Actual=Actual*100
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...