<?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: Using Eval and stats together in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-and-stats-together/m-p/479582#M134411</link>
    <description>&lt;P&gt;try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eventstats sum(data) as sum_of_data dc(MAC_Address) as dc_of_MAC_Address
| eval average = sum_of_data / dc_of_MAC_Address
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 27 Feb 2020 01:11:03 GMT</pubDate>
    <dc:creator>anmolpatel</dc:creator>
    <dc:date>2020-02-27T01:11:03Z</dc:date>
    <item>
      <title>Using Eval and stats together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-and-stats-together/m-p/479580#M134409</link>
      <description>&lt;P&gt;I am trying to feed the results of (2) subsearches into and eval search.&lt;/P&gt;

&lt;P&gt;| eval Average=data/asstes [stats sum(data) | return $data]  [stats count(MAC_Address) | retun $assets]  &lt;/P&gt;

&lt;P&gt;there may bay a better way to do this... I need to sum of data divded by to total number of unique MAC addresses.&lt;/P&gt;

&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 22:38:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Eval-and-stats-together/m-p/479580#M134409</guid>
      <dc:creator>ianpaquette</dc:creator>
      <dc:date>2020-02-26T22:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval and stats together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-and-stats-together/m-p/479581#M134410</link>
      <description>&lt;P&gt;Can you post some sample data?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 00:48:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Eval-and-stats-together/m-p/479581#M134410</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2020-02-27T00:48:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval and stats together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-Eval-and-stats-together/m-p/479582#M134411</link>
      <description>&lt;P&gt;try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eventstats sum(data) as sum_of_data dc(MAC_Address) as dc_of_MAC_Address
| eval average = sum_of_data / dc_of_MAC_Address
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Feb 2020 01:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-Eval-and-stats-together/m-p/479582#M134411</guid>
      <dc:creator>anmolpatel</dc:creator>
      <dc:date>2020-02-27T01:11:03Z</dc:date>
    </item>
  </channel>
</rss>

