<?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: Is it possible, within the same search, to find the count of events where the transaction duration is greater than and less than the average? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-within-the-same-search-to-find-the-count-of/m-p/237968#M70722</link>
    <description>&lt;P&gt;thanks this worked. &lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2016 19:56:49 GMT</pubDate>
    <dc:creator>vamshi245</dc:creator>
    <dc:date>2016-10-06T19:56:49Z</dc:date>
    <item>
      <title>Is it possible, within the same search, to find the count of events where the transaction duration is greater than and less than the average?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-within-the-same-search-to-find-the-count-of/m-p/237966#M70720</link>
      <description>&lt;P&gt;I am trying to get the count of events where the transaction duration is above the average duration and below the average duration. &lt;/P&gt;

&lt;P&gt;below is my search to find out the count of events above the average transaction duration:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=whatever*  sourcetype="Source"  "COMPONENTNAME=X" AND "EVENT=Received"|eval receivedtime=SERVER_TIME |join type=inner ORDERNUMBER max=0[search index=tas_prod  sourcetype="TAS:FUSION:ProdSupport:PRD:AuditDB"  "COMPONENTNAME=Y" AND "EVENT=Delivered"|eval deliveredTime=SERVER_TIME ]|eval diff = deliveredTime-receivedtime| eventstats avg(diff) as Avg | where diff&amp;gt;Avg| stats count as Grt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;is it possible to get the count of transactions with diff &amp;lt; Avg in the same search? like: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;searchStatement|eval diff = deliveredTime-receivedtime| eventstats avg(diff) as Avg | where diff&amp;gt;Avg| stats count as Grt | where diff &amp;lt; Avg |stats count as Lsr
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;please let me know if i can combine the count without using the same search statement another time to find the count for less than average&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 19:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-within-the-same-search-to-find-the-count-of/m-p/237966#M70720</guid>
      <dc:creator>vamshi245</dc:creator>
      <dc:date>2016-10-06T19:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible, within the same search, to find the count of events where the transaction duration is greater than and less than the average?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-within-the-same-search-to-find-the-count-of/m-p/237967#M70721</link>
      <description>&lt;P&gt;You could try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | stats count(eval(diff&amp;gt;Avg)) as Grt count(eval(diff&amp;lt;Avg)) as Lsr
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Oct 2016 19:50:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-within-the-same-search-to-find-the-count-of/m-p/237967#M70721</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-06T19:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible, within the same search, to find the count of events where the transaction duration is greater than and less than the average?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-within-the-same-search-to-find-the-count-of/m-p/237968#M70722</link>
      <description>&lt;P&gt;thanks this worked. &lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 19:56:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-within-the-same-search-to-find-the-count-of/m-p/237968#M70722</guid>
      <dc:creator>vamshi245</dc:creator>
      <dc:date>2016-10-06T19:56:49Z</dc:date>
    </item>
  </channel>
</rss>

