<?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 How to sum 2 rows in a table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-sum-2-rows-in-a-table/m-p/483294#M135329</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In the logs i am analyzing, one  of the field's value has changed (change is from '-' to '_'). For example if it was A-1 before, now its A_1. The rest of the entries are as is. So my table looks something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;category            error         exception
    A-1                5              0
    A_1                2              1
    B-1                3              0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to combine A-1 and A_1 as single row and the output should be something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;category      error    exception
    A-1         7            1
    B-1         3            0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any pointers are appreciated.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:13:04 GMT</pubDate>
    <dc:creator>niddhi</dc:creator>
    <dc:date>2020-09-30T02:13:04Z</dc:date>
    <item>
      <title>How to sum 2 rows in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sum-2-rows-in-a-table/m-p/483294#M135329</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In the logs i am analyzing, one  of the field's value has changed (change is from '-' to '_'). For example if it was A-1 before, now its A_1. The rest of the entries are as is. So my table looks something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;category            error         exception
    A-1                5              0
    A_1                2              1
    B-1                3              0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to combine A-1 and A_1 as single row and the output should be something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;category      error    exception
    A-1         7            1
    B-1         3            0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any pointers are appreciated.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:13:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sum-2-rows-in-a-table/m-p/483294#M135329</guid>
      <dc:creator>niddhi</dc:creator>
      <dc:date>2020-09-30T02:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum 2 rows in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sum-2-rows-in-a-table/m-p/483295#M135330</link>
      <description>&lt;P&gt;Try adding &lt;CODE&gt;| replace "_" with "-" in category&lt;/CODE&gt; before your &lt;CODE&gt;stats&lt;/CODE&gt; command.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 19:44:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sum-2-rows-in-a-table/m-p/483295#M135330</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-09-17T19:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum 2 rows in a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sum-2-rows-in-a-table/m-p/483296#M135331</link>
      <description>&lt;P&gt;Thanks, replace worked. The mentioned syntax didn't work exactly, but it worked in this format: &lt;BR /&gt;
 &lt;CODE&gt;eval category = replace(category, "A_1", "A-1")&lt;/CODE&gt;.Thanks so much, you saved the day!!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 20:30:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sum-2-rows-in-a-table/m-p/483296#M135331</guid>
      <dc:creator>niddhi</dc:creator>
      <dc:date>2019-09-17T20:30:41Z</dc:date>
    </item>
  </channel>
</rss>

