<?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 do I add every two rows into a seperate column? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435432#M124164</link>
    <description>&lt;P&gt;@akhera,&lt;/P&gt;

&lt;P&gt;Try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search|streamstats current=f window=1 last(Column1) as prev|eval rowno=1|accum rowno
|eval Total=if(rowno%2==0,Column1+prev,null())|fields - rowno,prev
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You shall change the logic to display data in  alternative columns if needed&lt;/P&gt;</description>
    <pubDate>Tue, 16 Oct 2018 14:36:17 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2018-10-16T14:36:17Z</dc:date>
    <item>
      <title>How do I add every two rows into a seperate column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435431#M124163</link>
      <description>&lt;P&gt;I want to add every two rows in a column and display them in new column as new total:&lt;/P&gt;

&lt;P&gt;Column1 &lt;BR /&gt;
1&lt;BR /&gt;&lt;BR /&gt;
2&lt;BR /&gt;
5&lt;BR /&gt;&lt;BR /&gt;
7&lt;BR /&gt;
8&lt;BR /&gt;&lt;BR /&gt;
9&lt;/P&gt;

&lt;P&gt;NewTotalColum&lt;/P&gt;

&lt;P&gt;3&lt;/P&gt;

&lt;P&gt;12&lt;/P&gt;

&lt;P&gt;17&lt;/P&gt;

&lt;P&gt;Any leads will be helpful.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 11:36:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435431#M124163</guid>
      <dc:creator>akhera</dc:creator>
      <dc:date>2018-10-16T11:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add every two rows into a seperate column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435432#M124164</link>
      <description>&lt;P&gt;@akhera,&lt;/P&gt;

&lt;P&gt;Try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search|streamstats current=f window=1 last(Column1) as prev|eval rowno=1|accum rowno
|eval Total=if(rowno%2==0,Column1+prev,null())|fields - rowno,prev
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You shall change the logic to display data in  alternative columns if needed&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 14:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435432#M124164</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-16T14:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add every two rows into a seperate column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435433#M124165</link>
      <description>&lt;P&gt;Hi @akhera,&lt;/P&gt;

&lt;P&gt;Did the answer below solve your problem? If so, please resolve this post by approving it! If your problem is still not solved, keep us updated so that someone else can help ya. Thanks for posting!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 16:17:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435433#M124165</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-10-18T16:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add every two rows into a seperate column?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435434#M124166</link>
      <description>&lt;P&gt;@mstjohn_splunk @renjith.nair  This is really helpful and it solved my issue. thanks for your help and support.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 08:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-every-two-rows-into-a-seperate-column/m-p/435434#M124166</guid>
      <dc:creator>akhera</dc:creator>
      <dc:date>2018-10-24T08:36:17Z</dc:date>
    </item>
  </channel>
</rss>

