<?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 an extra row to calculate the average of the rows above? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119038#M31896</link>
    <description>&lt;P&gt;The correct command for this would be &lt;CODE&gt;appendpipe&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Say you have something like: &lt;CODE&gt;...|stats sum(score) AS totalscore by item&lt;/CODE&gt;. Then you can do this: &lt;CODE&gt;...|appendpipe [stats avg(totalscore) AS totalscore |eval item="AVERAGE"]&lt;/CODE&gt;. (You need to use &lt;CODE&gt;AS&lt;/CODE&gt; in &lt;CODE&gt;appendpipe&lt;/CODE&gt; in order to put the average in the same column. You can leave item empt, if you want.)&lt;/P&gt;</description>
    <pubDate>Fri, 03 Aug 2018 11:15:14 GMT</pubDate>
    <dc:creator>echalex</dc:creator>
    <dc:date>2018-08-03T11:15:14Z</dc:date>
    <item>
      <title>How do I add an extra row to calculate the average of the rows above?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119036#M31894</link>
      <description>&lt;P&gt;I have connected to my database using Splunk DBConnect and using a simple sql query I have managed to get some data from the table. However I would like to have just one entry displayed that contains the average of the data above. How do I go about that? I am new to splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 00:38:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119036#M31894</guid>
      <dc:creator>BobKimata</dc:creator>
      <dc:date>2015-03-31T00:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an extra row to calculate the average of the rows above?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119037#M31895</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You can try using search command &lt;STRONG&gt;addcoltotals&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 06:08:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119037#M31895</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-03-31T06:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an extra row to calculate the average of the rows above?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119038#M31896</link>
      <description>&lt;P&gt;The correct command for this would be &lt;CODE&gt;appendpipe&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Say you have something like: &lt;CODE&gt;...|stats sum(score) AS totalscore by item&lt;/CODE&gt;. Then you can do this: &lt;CODE&gt;...|appendpipe [stats avg(totalscore) AS totalscore |eval item="AVERAGE"]&lt;/CODE&gt;. (You need to use &lt;CODE&gt;AS&lt;/CODE&gt; in &lt;CODE&gt;appendpipe&lt;/CODE&gt; in order to put the average in the same column. You can leave item empt, if you want.)&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 11:15:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119038#M31896</guid>
      <dc:creator>echalex</dc:creator>
      <dc:date>2018-08-03T11:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add an extra row to calculate the average of the rows above?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119039#M31897</link>
      <description>&lt;P&gt;This works for me.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;..| timechart span=1d count|appendpipe [stats avg(count) as Average]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks to @echalex &lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 01:34:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-add-an-extra-row-to-calculate-the-average-of-the-rows/m-p/119039#M31897</guid>
      <dc:creator>jawaharas</dc:creator>
      <dc:date>2019-03-12T01:34:58Z</dc:date>
    </item>
  </channel>
</rss>

