<?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: Calculate average number of calls by user in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-average-number-of-calls-by-user/m-p/23606#M4230</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;search that returns customer and call data
| bin _time span=1d
| stats count as calls by _time,customer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now you have the number of calls per customer per day&lt;/P&gt;

&lt;P&gt;The key thing is &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Bin"&gt;bin&lt;/A&gt; - this massages the times to the closest day&lt;/P&gt;

&lt;P&gt;Add the following for average calls / day per customer :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eventstats avg(calls) as avg_calls by customer 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or if you don't need so much detail :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats avg(calls) as avg_calls by customer
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 02 Aug 2013 19:43:11 GMT</pubDate>
    <dc:creator>jonuwz</dc:creator>
    <dc:date>2013-08-02T19:43:11Z</dc:date>
    <item>
      <title>Calculate average number of calls by user</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-average-number-of-calls-by-user/m-p/23605#M4229</link>
      <description>&lt;P&gt;Here is our situation, we handle calls. Every call generates a record. We would like to find out, over the span of 1 month, what the average number of calls every customer makes. Logically you'd figure out the number of calls made by each customer every day for a month, and find the average. Then you'd find the average from each of the 30 days. I haven't been able to wrap my mind around a way to do this with splunk.&lt;/P&gt;

&lt;P&gt;Any ideas on how to do this? I'd appreciate the help. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2013 19:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-average-number-of-calls-by-user/m-p/23605#M4229</guid>
      <dc:creator>msarro</dc:creator>
      <dc:date>2013-08-02T19:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average number of calls by user</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-average-number-of-calls-by-user/m-p/23606#M4230</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;search that returns customer and call data
| bin _time span=1d
| stats count as calls by _time,customer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now you have the number of calls per customer per day&lt;/P&gt;

&lt;P&gt;The key thing is &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Bin"&gt;bin&lt;/A&gt; - this massages the times to the closest day&lt;/P&gt;

&lt;P&gt;Add the following for average calls / day per customer :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eventstats avg(calls) as avg_calls by customer 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or if you don't need so much detail :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats avg(calls) as avg_calls by customer
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Aug 2013 19:43:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-average-number-of-calls-by-user/m-p/23606#M4230</guid>
      <dc:creator>jonuwz</dc:creator>
      <dc:date>2013-08-02T19:43:11Z</dc:date>
    </item>
  </channel>
</rss>

