<?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: sum of average values based on two other columns in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/sum-of-average-values-based-on-two-other-columns/m-p/43441#M10221</link>
    <description>&lt;P&gt;This should be possible with a two-step stat chain, something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | bucket span=1m _time | stats avg(unique ip count) as avg_uic by _time hub port | stats sum(avg_uic) as sum_uic by _time hub | xyseries _time hub sum_uic
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should first compute the average per hub-port combination bucketed per minute, and then sum up the averages per hub.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Nov 2012 09:53:49 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2012-11-23T09:53:49Z</dc:date>
    <item>
      <title>sum of average values based on two other columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sum-of-average-values-based-on-two-other-columns/m-p/43440#M10220</link>
      <description>&lt;P&gt;hi, given the following data&lt;/P&gt;

&lt;P&gt;time, hub, port, unique ip count&lt;/P&gt;

&lt;P&gt;12:11:01    a   1   23&lt;/P&gt;

&lt;P&gt;12:11:02    b   2   34  &lt;/P&gt;

&lt;P&gt;12:11:03    a   3   33&lt;/P&gt;

&lt;P&gt;12:11:04    a   2   23&lt;/P&gt;

&lt;P&gt;12:11:06    c   3   65&lt;/P&gt;

&lt;P&gt;12:11:07    b   4   43&lt;/P&gt;

&lt;P&gt;12:11:08    b   3   54&lt;/P&gt;

&lt;P&gt;12:11:09    c   2   32&lt;/P&gt;

&lt;P&gt;12:11:09    b   1   42&lt;/P&gt;

&lt;P&gt;12:11:10    a   4   33&lt;/P&gt;

&lt;P&gt;-- skipping all but a&lt;/P&gt;

&lt;P&gt;12:11:15    a   1   43&lt;/P&gt;

&lt;P&gt;12:11:34    a   2   64&lt;/P&gt;

&lt;P&gt;12:11:39    a   3   43&lt;/P&gt;

&lt;P&gt;12:11:50    a   4   32&lt;/P&gt;

&lt;P&gt;I want to find the average of a1 to a4 per minute &lt;/P&gt;

&lt;P&gt;so 122+182/2 =152 for 12:11 &lt;/P&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;P&gt;avg( (23+33+23+33) + (43+64+43+32) )&lt;/P&gt;

&lt;P&gt;(note there will normally be more than two instances per minute and there can be any number of ports and hubs)&lt;/P&gt;

&lt;P&gt;I also want to do this for b,c,d etc so I can plot them against each other over a given time period&lt;/P&gt;

&lt;P&gt;or to put it another way the average number of unique ip address per hub per minute - even though the data only shows the unique ip per port&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2012 08:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sum-of-average-values-based-on-two-other-columns/m-p/43440#M10220</guid>
      <dc:creator>stephen123</dc:creator>
      <dc:date>2012-11-23T08:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: sum of average values based on two other columns</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sum-of-average-values-based-on-two-other-columns/m-p/43441#M10221</link>
      <description>&lt;P&gt;This should be possible with a two-step stat chain, something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | bucket span=1m _time | stats avg(unique ip count) as avg_uic by _time hub port | stats sum(avg_uic) as sum_uic by _time hub | xyseries _time hub sum_uic
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should first compute the average per hub-port combination bucketed per minute, and then sum up the averages per hub.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2012 09:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sum-of-average-values-based-on-two-other-columns/m-p/43441#M10221</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2012-11-23T09:53:49Z</dc:date>
    </item>
  </channel>
</rss>

