<?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: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131422#M35857</link>
    <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I wasnt aware of the appendpipe function&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jun 2015 07:15:35 GMT</pubDate>
    <dc:creator>ramdaspr</dc:creator>
    <dc:date>2015-06-01T07:15:35Z</dc:date>
    <item>
      <title>If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131414#M35849</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I was wondering if someone could assist with the following.&lt;/P&gt;

&lt;P&gt;I have a table built up as daily averages of 'duration' for events. The 'duration' here refers to the time it takes for the event to complete.  I would like to display the standard deviation of these averages at the bottom of  the table as a consolidated result. Is this possible in Splunk?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 03:49:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131414#M35849</guid>
      <dc:creator>brutecat</dc:creator>
      <dc:date>2015-06-01T03:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131415#M35850</link>
      <description>&lt;P&gt;This is one of the cases where &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/appendpipe"&gt;appendpipe&lt;/A&gt; is awesome and sounds like exactly what you're looking for. What happens is, this command takes the results you have before it, feeds it as input to a subsearch, and appends the results to your search.&lt;/P&gt;

&lt;P&gt;Now you didn't state it explicitly, but I'm going to assume you have some &lt;CODE&gt;EXISTING SEARCH&lt;/CODE&gt; that's producing a table of two fields (columns), &lt;CODE&gt;day&lt;/CODE&gt; stating the day, and &lt;CODE&gt;avgduration&lt;/CODE&gt; being the average duration for the given day. &lt;/P&gt;

&lt;P&gt;Now if we want to add the standard deviation of the averages as a new row we just modify your search like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXISTING SEARCH | appendpipe [stats stdev(avgduration) as stddev | eval day="ALL"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Obviously you're able to rename the fields and use eval to tweak other values as you see fit within and outside of the search. Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 04:49:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131415#M35850</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2015-06-01T04:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131416#M35851</link>
      <description>&lt;P&gt;Hey acharlieh, thanks - perfect&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 05:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131416#M35851</guid>
      <dc:creator>brutecat</dc:creator>
      <dc:date>2015-06-01T05:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131417#M35852</link>
      <description>&lt;P&gt;Assuming your table has Duration_avg as fields,&lt;BR /&gt;
Use the below command to find standardDeviation of a Field&lt;BR /&gt;
 | stats stddev() AS STDDEV&lt;BR /&gt;
In your case,for ex:&lt;BR /&gt;
 | stats stddev(Duration_avg ) AS STDDEV&lt;/P&gt;

&lt;P&gt;Hope it helps for you...&lt;/P&gt;

&lt;P&gt;References:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/CommonStatsFunctions" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:06:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131417#M35852</guid>
      <dc:creator>jackson1990</dc:creator>
      <dc:date>2020-09-28T20:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131418#M35853</link>
      <description>&lt;P&gt;Sure you can.&lt;BR /&gt;
Since there isnt a data sample, I am assuming you have 2 columns, Event, Average&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex | table Event,Average | append [search index=myindex | stats stdev(Average) as Average]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The idea is to calculate the std deviation separately and then append the results to your table. The renaming in the subsearch is so that the results are appended to the column Average.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 05:16:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131418#M35853</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-06-01T05:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131419#M35854</link>
      <description>&lt;P&gt;You're welcome!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 07:04:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131419#M35854</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2015-06-01T07:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131420#M35855</link>
      <description>&lt;P&gt;Simply piping to stats would destroy the table, which since the OP asked to display the average of the standard deviations at the bottom of the table I'm assuming this was not the intention.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 07:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131420#M35855</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2015-06-01T07:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131421#M35856</link>
      <description>&lt;P&gt;While your solution would get you to the correct answer, in this case since the field and data that you're wanting to take the standard deviation of is already in the results of the table, you should prefer appendpipe as I had stated which lets you simply build from results you have already retrieved, instead of incurring a performance penalty by having to go all the way back to the indexes on disk (and possibly remote indexers) which is what would happen by doing an append search as you have suggested.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 07:10:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131421#M35856</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2015-06-01T07:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a table with daily averages, how do I display the standard deviation of these averages at the bottom of the table as a consolidated result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131422#M35857</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I wasnt aware of the appendpipe function&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 07:15:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-table-with-daily-averages-how-do-I-display-the/m-p/131422#M35857</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-06-01T07:15:35Z</dc:date>
    </item>
  </channel>
</rss>

