<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to multiply column values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436435#M124389</link>
    <description>&lt;P&gt;@rslama &lt;/P&gt;

&lt;P&gt;You can achieve this scenario by playing with some awesome SPL commands. Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH | eventstats list(Yield) as crossYield by Group | nomv crossYield | map search="| makeresults | eval s=\"$crossYield$\", s=split(s,\" \"), a=1 | mvexpand s | accum a | eval val_{a}=s | stats values(val_*) as val_* | eval crossYield=round(1,10) | foreach val_* [ eval crossYield=exact(crossYield * '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;') ] | eval Group=\"$Group$\",SubGroup=\"$SubGroup$\",Yield=\"$Yield$\" | table Group SubGroup Yield crossYield "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Sample Search:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval _raw="Group    SubGroup    Yield
A   A.0 0.9
A   A.1 0.99
A   A.2 0.75
A   A.4 0.8
B   B.1 1
B   B.2 0.9
B   B.11    0.3
C   C.5 1
C   C.19    0.8" | multikv | table Group SubGroup Yield | eventstats list(Yield) as crossYield by Group | nomv crossYield | map search="| makeresults | eval s=\"$crossYield$\", s=split(s,\" \"), a=1 | mvexpand s | accum a | eval val_{a}=s | stats values(val_*) as val_* | eval crossYield=round(1,10) | foreach val_* [ eval crossYield=exact(crossYield * '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;') ] | eval Group=\"$Group$\",SubGroup=\"$SubGroup$\",Yield=\"$Yield$\" | table Group SubGroup Yield crossYield "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 06:35:58 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2019-06-21T06:35:58Z</dc:date>
    <item>
      <title>How to multiply column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436434#M124388</link>
      <description>&lt;P&gt;The way I do this in excel is by using the formula  &lt;CODE&gt;"=PRODUCT(C2*C3*C4*C5)"&lt;/CODE&gt;&lt;BR /&gt;
How can I do that in Splunk?&lt;/P&gt;

&lt;P&gt;Ideally, I want to do something like this:&lt;BR /&gt;
search stuff&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| foreach group
     [eval crossyield=PRODUCT(yield)]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7234i0FCBC7986F59E3FA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 20:50:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436434#M124388</guid>
      <dc:creator>rslama</dc:creator>
      <dc:date>2019-06-20T20:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to multiply column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436435#M124389</link>
      <description>&lt;P&gt;@rslama &lt;/P&gt;

&lt;P&gt;You can achieve this scenario by playing with some awesome SPL commands. Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH | eventstats list(Yield) as crossYield by Group | nomv crossYield | map search="| makeresults | eval s=\"$crossYield$\", s=split(s,\" \"), a=1 | mvexpand s | accum a | eval val_{a}=s | stats values(val_*) as val_* | eval crossYield=round(1,10) | foreach val_* [ eval crossYield=exact(crossYield * '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;') ] | eval Group=\"$Group$\",SubGroup=\"$SubGroup$\",Yield=\"$Yield$\" | table Group SubGroup Yield crossYield "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Sample Search:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval _raw="Group    SubGroup    Yield
A   A.0 0.9
A   A.1 0.99
A   A.2 0.75
A   A.4 0.8
B   B.1 1
B   B.2 0.9
B   B.11    0.3
C   C.5 1
C   C.19    0.8" | multikv | table Group SubGroup Yield | eventstats list(Yield) as crossYield by Group | nomv crossYield | map search="| makeresults | eval s=\"$crossYield$\", s=split(s,\" \"), a=1 | mvexpand s | accum a | eval val_{a}=s | stats values(val_*) as val_* | eval crossYield=round(1,10) | foreach val_* [ eval crossYield=exact(crossYield * '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;') ] | eval Group=\"$Group$\",SubGroup=\"$SubGroup$\",Yield=\"$Yield$\" | table Group SubGroup Yield crossYield "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 06:35:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436435#M124389</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-06-21T06:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to multiply column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436436#M124390</link>
      <description>&lt;P&gt;Thank @kamlesh_vaghela &lt;BR /&gt;
this works perfectly. but how do I change limit=0?&lt;BR /&gt;
I am only getting 10 results in my statistics table.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 21:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436436#M124390</guid>
      <dc:creator>rslama</dc:creator>
      <dc:date>2019-06-21T21:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to multiply column values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436437#M124391</link>
      <description>&lt;P&gt;NVM, I found the answer. I needed to set maxsearch&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 22:19:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-multiply-column-values/m-p/436437#M124391</guid>
      <dc:creator>rslama</dc:creator>
      <dc:date>2019-06-21T22:19:02Z</dc:date>
    </item>
  </channel>
</rss>

