<?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: Adding a row that is the sum of the events for each specific time to a table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-row-that-is-the-sum-of-the-events-for-each-specific/m-p/565207#M196912</link>
    <description>&lt;P&gt;Use appendpipe.&lt;/P&gt;&lt;PRE&gt;| makeresults | eval _raw="Time,User,Number&lt;BR /&gt;9pm,Josh,2&lt;BR /&gt;9pm,Andy,13&lt;BR /&gt;10pm,Josh,1&lt;BR /&gt;10pm,Andy,2&lt;BR /&gt;10pm,Joseph,1" | multikv noheader=f | table Time User Number &lt;BR /&gt;| appendpipe &lt;BR /&gt;[stats sum(Number) as Number by Time &lt;BR /&gt;| eval User="Total"] &lt;BR /&gt;| sort Time&lt;/PRE&gt;&lt;P&gt;Of course in order to have the "Total" row at the end of each section, you need either to name it so it's always sortable at the end or add additional field to sort by.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Aug 2021 08:39:55 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-08-30T08:39:55Z</dc:date>
    <item>
      <title>Adding a row that is the sum of the events for each specific time to a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-row-that-is-the-sum-of-the-events-for-each-specific/m-p/565197#M196907</link>
      <description>&lt;P&gt;Is this possible to transform a data set from :&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="24.469161162355597%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="6.25%" height="46px"&gt;Time&lt;/TD&gt;&lt;TD width="6.25%" height="46px"&gt;User&lt;/TD&gt;&lt;TD width="12.5%" height="46px"&gt;Number of Errors&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="24px"&gt;9 pm&lt;/TD&gt;&lt;TD width="6.25%" height="24px"&gt;Josh&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="24px"&gt;9 pm&lt;/TD&gt;&lt;TD width="6.25%" height="24px"&gt;Andy&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="24px"&gt;10 pm&lt;/TD&gt;&lt;TD width="6.25%" height="24px"&gt;Josh&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="24px"&gt;10 pm&lt;/TD&gt;&lt;TD width="6.25%" height="24px"&gt;Andy&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="24px"&gt;11 pm&lt;/TD&gt;&lt;TD width="6.25%" height="24px"&gt;Josh&lt;/TD&gt;&lt;TD width="12.5%" height="24px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11 pm&lt;/TD&gt;&lt;TD&gt;Andy&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;to :&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="15.43141592920354%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="6.25%" height="91px"&gt;Time&lt;/TD&gt;&lt;TD width="6.25%" height="91px"&gt;User&lt;/TD&gt;&lt;TD width="6.25%" height="91px"&gt;Number of Errors&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="47px"&gt;9 pm&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;Josh&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="47px"&gt;9 pm&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;Andy&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="91px"&gt;9 pm&lt;/TD&gt;&lt;TD width="6.25%" height="91px"&gt;Total Number of Errors&lt;/TD&gt;&lt;TD width="6.25%" height="91px"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="47px"&gt;10 pm&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;Josh&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="47px"&gt;10 pm&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;Andy&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="77px"&gt;10 pm&lt;/TD&gt;&lt;TD width="6.25%" height="77px"&gt;Total Number of Errors&lt;/TD&gt;&lt;TD width="6.25%" height="77px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="47px"&gt;11 pm&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;Josh&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="47px"&gt;11 pm&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;Andy&lt;/TD&gt;&lt;TD width="6.25%" height="47px"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="6.25%" height="25px"&gt;11 pm&lt;/TD&gt;&lt;TD width="6.25%" height="25px"&gt;Total Number of Errors&lt;/TD&gt;&lt;TD width="6.25%" height="25px"&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've tried to use&amp;nbsp; :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;&amp;lt;insert index here&amp;gt; | convert num("Number of Errors") as NumberofErrors |eval Total_Number_of_Errors= Josh + Andy |table Time User Number of Errors&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However&amp;nbsp; its erroring out when i try to run this query .&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 05:17:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-a-row-that-is-the-sum-of-the-events-for-each-specific/m-p/565197#M196907</guid>
      <dc:creator>learningsplunk</dc:creator>
      <dc:date>2021-08-30T05:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row that is the sum of the events for each specific time to a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-row-that-is-the-sum-of-the-events-for-each-specific/m-p/565207#M196912</link>
      <description>&lt;P&gt;Use appendpipe.&lt;/P&gt;&lt;PRE&gt;| makeresults | eval _raw="Time,User,Number&lt;BR /&gt;9pm,Josh,2&lt;BR /&gt;9pm,Andy,13&lt;BR /&gt;10pm,Josh,1&lt;BR /&gt;10pm,Andy,2&lt;BR /&gt;10pm,Joseph,1" | multikv noheader=f | table Time User Number &lt;BR /&gt;| appendpipe &lt;BR /&gt;[stats sum(Number) as Number by Time &lt;BR /&gt;| eval User="Total"] &lt;BR /&gt;| sort Time&lt;/PRE&gt;&lt;P&gt;Of course in order to have the "Total" row at the end of each section, you need either to name it so it's always sortable at the end or add additional field to sort by.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 08:39:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-a-row-that-is-the-sum-of-the-events-for-each-specific/m-p/565207#M196912</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-08-30T08:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a row that is the sum of the events for each specific time to a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-a-row-that-is-the-sum-of-the-events-for-each-specific/m-p/565248#M196931</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp; ,&amp;nbsp; Thanks !&amp;nbsp; Thought i had to start creating 2 different charts and the combining them both using a union to get a total count for this.&amp;nbsp; The&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;| appendpipe &lt;/LI-CODE&gt;&lt;P&gt;Splunk transforming command exactly addresses that issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 17:12:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-a-row-that-is-the-sum-of-the-events-for-each-specific/m-p/565248#M196931</guid>
      <dc:creator>learningsplunk</dc:creator>
      <dc:date>2021-08-30T17:12:10Z</dc:date>
    </item>
  </channel>
</rss>

