<?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 List above average values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/List-above-average-values/m-p/94706#M182436</link>
    <description>&lt;P&gt;Hi Folks.&lt;/P&gt;

&lt;P&gt;I'm not experienced with Splunk but have gone through the Search tutorial and have checked this blog trying to find someone with a similar issue with no luck.&lt;/P&gt;

&lt;P&gt;I'm looking at trying to show values that are above the average of the same set of values. &lt;BR /&gt;
The first bit I'm doing is &lt;STRONG&gt;... | top src limit=0 countfield=MAX&lt;/STRONG&gt; which works fine.&lt;BR /&gt;
The second bit I'm doing is &lt;STRONG&gt;... | top src limit=0 countfield=MAX | stats avg(MAX) as AVG&lt;/STRONG&gt; which works fine and gives me the average of MAX.&lt;/P&gt;

&lt;P&gt;What I'm then trying to do is compare MAX to AVG and only show those MAX value which are higher than AVG. The following search doesn't work but it kind of shows what I'm trying to do.&lt;BR /&gt;
&lt;STRONG&gt;...top src limit=0 countfield=MAX | stats avg(MAX) as AVG | where MAX&amp;gt;AVG&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I think the issue is that the stats avg command is filtering out the MAX results, so there's nothing left for the "where" at the end. Once I get this working, I'll probably use something like "anomalies" to just show MAX values a particular distance from AVG.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jul 2013 06:37:37 GMT</pubDate>
    <dc:creator>geoff_still</dc:creator>
    <dc:date>2013-07-15T06:37:37Z</dc:date>
    <item>
      <title>List above average values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-above-average-values/m-p/94706#M182436</link>
      <description>&lt;P&gt;Hi Folks.&lt;/P&gt;

&lt;P&gt;I'm not experienced with Splunk but have gone through the Search tutorial and have checked this blog trying to find someone with a similar issue with no luck.&lt;/P&gt;

&lt;P&gt;I'm looking at trying to show values that are above the average of the same set of values. &lt;BR /&gt;
The first bit I'm doing is &lt;STRONG&gt;... | top src limit=0 countfield=MAX&lt;/STRONG&gt; which works fine.&lt;BR /&gt;
The second bit I'm doing is &lt;STRONG&gt;... | top src limit=0 countfield=MAX | stats avg(MAX) as AVG&lt;/STRONG&gt; which works fine and gives me the average of MAX.&lt;/P&gt;

&lt;P&gt;What I'm then trying to do is compare MAX to AVG and only show those MAX value which are higher than AVG. The following search doesn't work but it kind of shows what I'm trying to do.&lt;BR /&gt;
&lt;STRONG&gt;...top src limit=0 countfield=MAX | stats avg(MAX) as AVG | where MAX&amp;gt;AVG&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I think the issue is that the stats avg command is filtering out the MAX results, so there's nothing left for the "where" at the end. Once I get this working, I'll probably use something like "anomalies" to just show MAX values a particular distance from AVG.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2013 06:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-above-average-values/m-p/94706#M182436</guid>
      <dc:creator>geoff_still</dc:creator>
      <dc:date>2013-07-15T06:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: List above average values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-above-average-values/m-p/94707#M182437</link>
      <description>&lt;P&gt;Well, another way you could spin this is to do something like;&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;| stats max(metric) as MAX, avg(metric) as AVG&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;And then stick your where/filter after that&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2013 07:33:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-above-average-values/m-p/94707#M182437</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2013-07-15T07:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: List above average values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-above-average-values/m-p/94708#M182438</link>
      <description>&lt;P&gt;Thanks Drainy, as the metrics not a number but an IP address I don't think that's going to work for me as is, but it may have shown me the way. I've combined my search and your suggestion to get:&lt;BR /&gt;
&lt;STRONG&gt;top metric limit=0 countfield=MAX | stats max(MAX), avg(MAX) as AVG&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;It's not what I was originally aiming for as "top" gives me a list and max just gives me the highest value, but I'm actually mostly interested in that highest value and its distance from the average. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2013 22:49:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-above-average-values/m-p/94708#M182438</guid>
      <dc:creator>geoff_still</dc:creator>
      <dc:date>2013-07-15T22:49:03Z</dc:date>
    </item>
  </channel>
</rss>

