<?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: Average of the total count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338933#M100513</link>
    <description>&lt;P&gt;@krusovice,&lt;BR /&gt;
Please Upvote the answer if that helped!!&lt;BR /&gt;
Thanks!!&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 08:49:57 GMT</pubDate>
    <dc:creator>deepashri_123</dc:creator>
    <dc:date>2018-03-15T08:49:57Z</dc:date>
    <item>
      <title>Average of the total count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338928#M100508</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;How can I get the average of the output as below? &lt;/P&gt;

&lt;P&gt;Calculation is 40 + 20 + 50 / 3 = 36.6&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REQUEST          ID          DURATION          AVERAGE
AAA              1122        40 seconds        36.6 seconds
BBB              3344        20 seconds
CCC              5566        50 seconds
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 06:01:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338928#M100508</guid>
      <dc:creator>krusovice</dc:creator>
      <dc:date>2018-03-12T06:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Average of the total count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338929#M100509</link>
      <description>&lt;P&gt;Hi @krusovice,&lt;BR /&gt;
try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...|rex field="DURATION" "(?&amp;lt;DURATION&amp;gt;\d+)"
|eventstats avg(DURATION) as average
|eval average=round(average,1)." seconds"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try this run anywhere search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults|eval REQUEST="AAA", DURATION="40 seconds"
|append[|makeresults|eval REQUEST="BBB", DURATION="20 seconds"]
|append[|makeresults|eval REQUEST="CCC", DURATION="50 seconds"]
|rex field="DURATION" "(?&amp;lt;DURATION&amp;gt;\d+)"
|eventstats avg(DURATION) as average
|eval average=round(average,1)." seconds"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Mar 2018 06:17:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338929#M100509</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-03-12T06:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: Average of the total count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338930#M100510</link>
      <description>&lt;P&gt;Hey krusovoice,&lt;/P&gt;

&lt;P&gt;You can try this run anywhere query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval Request="AAA BBB CCC" | makemv Request| mvexpand Request | appendcols [| makeresults | eval ID="1122 3344 5566" | makemv ID| mvexpand ID ] |  appendcols [| makeresults | eval Duration="40seconds 50seconds 20seconds" | makemv Duration| mvexpand Duration ] |rex field=Duration "(?P&amp;lt;Dur&amp;gt;\d+)"| eventstats avg(Dur) AS avgDur
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR you can add this to your query:&lt;BR /&gt;
|rex field=Duration "(?P\d+)"| eventstats avg(Dur) AS avgDur&lt;/P&gt;

&lt;P&gt;Let me know if this helps!!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 06:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338930#M100510</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2018-03-12T06:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Average of the total count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338931#M100511</link>
      <description>&lt;P&gt;Thank you @493669 for the great helps! It's work well in my dashboard.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 06:53:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338931#M100511</guid>
      <dc:creator>krusovice</dc:creator>
      <dc:date>2018-03-12T06:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Average of the total count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338932#M100512</link>
      <description>&lt;P&gt;Hi deepashri_123,&lt;/P&gt;

&lt;P&gt;eventstats just make the trick! Thank you as always.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 06:58:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338932#M100512</guid>
      <dc:creator>krusovice</dc:creator>
      <dc:date>2018-03-12T06:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Average of the total count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338933#M100513</link>
      <description>&lt;P&gt;@krusovice,&lt;BR /&gt;
Please Upvote the answer if that helped!!&lt;BR /&gt;
Thanks!!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 08:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-of-the-total-count/m-p/338933#M100513</guid>
      <dc:creator>deepashri_123</dc:creator>
      <dc:date>2018-03-15T08:49:57Z</dc:date>
    </item>
  </channel>
</rss>

