<?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 iterate a value in ColumnA through all values in ColumnB doing an eval division with the output in ColumnC? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-iterate-a-value-in-ColumnA-through-all-values-in-ColumnB/m-p/173483#M49757</link>
    <description>&lt;P&gt;If the column isnt multivalues, you can use streamstats to capture what the first value of the column is and use it to calculate the new column.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | streamstats first(columnA) as div | eval result=columnB/div | table columnA, ColumnB,result
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 11 Mar 2015 00:47:25 GMT</pubDate>
    <dc:creator>ramdaspr</dc:creator>
    <dc:date>2015-03-11T00:47:25Z</dc:date>
    <item>
      <title>How to iterate a value in ColumnA through all values in ColumnB doing an eval division with the output in ColumnC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-iterate-a-value-in-ColumnA-through-all-values-in-ColumnB/m-p/173481#M49755</link>
      <description>&lt;P&gt;Hello folks,&lt;/P&gt;

&lt;P&gt;I have a stats result with two columns:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Column A - only one result in the first line&lt;BR /&gt;
Column B -  8 lines of different values&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;I'd like to iterate the value in Column A through all the values in Column B, doing a eval division, that would be returned in a third column.&lt;BR /&gt;
For example: columnA.firstline/columnB.firstline, columnA.secondline/columnB.firstline, ...&lt;/P&gt;

&lt;P&gt;Is it possible?&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2015 15:19:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-iterate-a-value-in-ColumnA-through-all-values-in-ColumnB/m-p/173481#M49755</guid>
      <dc:creator>mrncst</dc:creator>
      <dc:date>2015-03-10T15:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to iterate a value in ColumnA through all values in ColumnB doing an eval division with the output in ColumnC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-iterate-a-value-in-ColumnA-through-all-values-in-ColumnB/m-p/173482#M49756</link>
      <description>&lt;P&gt;I am guessing ColumnB is a multivalued field (output of aggregation commands like values/list). Here is what you can try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search giving single valued field ColumnA and multivalued field ColumnB | eval ColumnB_Orig=ColumnB| mvexpand ColumnB | eval ColumnC=round(ColumnA/ColumnB,2) | rename ColumnB_Orig as ColumnB| table ColumnA, ColumnB, ColumnC
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2015 17:38:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-iterate-a-value-in-ColumnA-through-all-values-in-ColumnB/m-p/173482#M49756</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-03-10T17:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to iterate a value in ColumnA through all values in ColumnB doing an eval division with the output in ColumnC?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-iterate-a-value-in-ColumnA-through-all-values-in-ColumnB/m-p/173483#M49757</link>
      <description>&lt;P&gt;If the column isnt multivalues, you can use streamstats to capture what the first value of the column is and use it to calculate the new column.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | streamstats first(columnA) as div | eval result=columnB/div | table columnA, ColumnB,result
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Mar 2015 00:47:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-iterate-a-value-in-ColumnA-through-all-values-in-ColumnB/m-p/173483#M49757</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-03-11T00:47:25Z</dc:date>
    </item>
  </channel>
</rss>

