<?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: How do you compute the average number of emails contained in two different sources? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454729#M166823</link>
    <description>&lt;P&gt;You switch from saying sourcetype to saying source.  These are two different things.  Since the partial SPL you provided says source I'm going to run with that.  You can always replace source with sourcetype and it will still work. &lt;/P&gt;

&lt;P&gt;This would get you the average number of emails per company name and source&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=testing (source="source1" OR source="source2") 
| stats avg(Emails) as Average by companyName source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can then choose your visualization to determine the type of graph you want. &lt;/P&gt;</description>
    <pubDate>Mon, 29 Oct 2018 17:56:13 GMT</pubDate>
    <dc:creator>kmaron</dc:creator>
    <dc:date>2018-10-29T17:56:13Z</dc:date>
    <item>
      <title>How do you compute the average number of emails contained in two different sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454728#M166822</link>
      <description>&lt;P&gt;I have two different sourcetypes with same index name. Both sources they have emails and it shows the number of those emails. I would like to aggregate both sources and find the average of emails from both sources, represent that on graph. &lt;/P&gt;

&lt;P&gt;source="source1" source="source2" index=testing |stats avg(Emails) by companyName&lt;/P&gt;

&lt;P&gt;I'm using Splunk Enterprise(Search and Reporting) -&amp;gt; making dashboards. Thank you in advance. &lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 17:36:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454728#M166822</guid>
      <dc:creator>maryamchar</dc:creator>
      <dc:date>2018-10-29T17:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compute the average number of emails contained in two different sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454729#M166823</link>
      <description>&lt;P&gt;You switch from saying sourcetype to saying source.  These are two different things.  Since the partial SPL you provided says source I'm going to run with that.  You can always replace source with sourcetype and it will still work. &lt;/P&gt;

&lt;P&gt;This would get you the average number of emails per company name and source&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=testing (source="source1" OR source="source2") 
| stats avg(Emails) as Average by companyName source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can then choose your visualization to determine the type of graph you want. &lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 17:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454729#M166823</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-10-29T17:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compute the average number of emails contained in two different sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454730#M166824</link>
      <description>&lt;P&gt;sorry i meant source. The above gave me the result of an average of one source and not combined. I want the average of both sources combined for emails by company. &lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2018 18:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454730#M166824</guid>
      <dc:creator>maryamchar</dc:creator>
      <dc:date>2018-10-29T18:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compute the average number of emails contained in two different sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454731#M166825</link>
      <description>&lt;P&gt;You just need to remove source. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=testing (source="source1" OR source="source2") 
  | stats avg(Emails) as Average by companyName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Oct 2018 20:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454731#M166825</guid>
      <dc:creator>kmaron</dc:creator>
      <dc:date>2018-10-29T20:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you compute the average number of emails contained in two different sources?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454732#M166826</link>
      <description>&lt;P&gt;Thank you! &lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 14:33:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-compute-the-average-number-of-emails-contained-in-two/m-p/454732#M166826</guid>
      <dc:creator>maryamchar</dc:creator>
      <dc:date>2018-10-30T14:33:34Z</dc:date>
    </item>
  </channel>
</rss>

