Splunk Search

How to Calculate the product of a numeric field (multiplication)?


I have a field with the following values. How can I calculate the product i.e multiply all values with each other? There is a sum function but no multiplication. The output should be = 0.1*0.03*0.34*0.32. Thanks 





Labels (3)
0 Karma

Revered Legend

Will something like this work for you?

| makeresults | eval t="0.1 0.03 0.34 0.32" | makemv t | mvexpand t 
| streamstats count | eval count="TTT".count | xyseries _time count t | eval multiply=1 | foreach TTT* [| eval multiply=multiply*'<<FIELD>>'] | table multiply

 (first line to generate sample data). 

0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...