<?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: Search output of a stats command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307089#M92097</link>
    <description>&lt;P&gt;In fact, it worked. I had to use AS command in stats&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/154916/how-to-search-and-filter-based-on-fields-created-by-stats.html"&gt;https://answers.splunk.com/answers/154916/how-to-search-and-filter-based-on-fields-created-by-stats.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;| stats values(EndPointMatchedProfile) AS profile by EndPointMACAddress | eval pcount=mvcount(profile) | where pcount &amp;lt;2 AND (profile=="Unknown" OR profile="")&lt;/P&gt;

&lt;P&gt;Thank you worshamn, much appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Aug 2017 04:13:02 GMT</pubDate>
    <dc:creator>ashabc</dc:creator>
    <dc:date>2017-08-28T04:13:02Z</dc:date>
    <item>
      <title>Search output of a stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307085#M92093</link>
      <description>&lt;P&gt;I have a search like below&lt;/P&gt;

&lt;P&gt;| stats values(EndPointMatchedProfile) by EndPointMACAddress&lt;/P&gt;

&lt;P&gt;Where each EndPointMACAddress may have one or more EndPointMatchedProfile values.&lt;/P&gt;

&lt;P&gt;How do I find out EndPointMACAddress that has  only one EndPointMatchedProfile value and that value is "Unknown". I do not want to return EndPointMACAddress that has two or more EndPointMatchedProfile values and one of them is "Unknown"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 01:27:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307085#M92093</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2017-08-28T01:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Search output of a stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307086#M92094</link>
      <description>&lt;P&gt;Just add a count to it, then use a where clause to find the condition you are looking for. &lt;/P&gt;

&lt;P&gt;| stats values(EndPointMatchedProfile) AS EndPointMatchedProfile count by EndPointMACAddress&lt;BR /&gt;
|where count =="1" AND EndPointMatchedProfile=="Unknown"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 01:43:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307086#M92094</guid>
      <dc:creator>worshamn</dc:creator>
      <dc:date>2017-08-28T01:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Search output of a stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307087#M92095</link>
      <description>&lt;P&gt;Actually I'm not sure that the stats count will be the right count, you may instead before the where statement do an eval:&lt;/P&gt;

&lt;P&gt;|eval count = mvcount(EndPointMatchedProfile)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 01:46:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307087#M92095</guid>
      <dc:creator>worshamn</dc:creator>
      <dc:date>2017-08-28T01:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Search output of a stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307088#M92096</link>
      <description>&lt;P&gt;Thank you Worshamn for responding so quickly. I tried the command you suggested, I don't think where command is working correctly. If I put where==2 it does not return any result. However, I know  for sure, that there are multiple values of EndPointMatchedProfile for many EndPointMACAddress with two values and one of EndPointMatchedProfile is unknown.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 03:49:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307088#M92096</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2017-08-28T03:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Search output of a stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307089#M92097</link>
      <description>&lt;P&gt;In fact, it worked. I had to use AS command in stats&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/154916/how-to-search-and-filter-based-on-fields-created-by-stats.html"&gt;https://answers.splunk.com/answers/154916/how-to-search-and-filter-based-on-fields-created-by-stats.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;| stats values(EndPointMatchedProfile) AS profile by EndPointMACAddress | eval pcount=mvcount(profile) | where pcount &amp;lt;2 AND (profile=="Unknown" OR profile="")&lt;/P&gt;

&lt;P&gt;Thank you worshamn, much appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 04:13:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307089#M92097</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2017-08-28T04:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Search output of a stats command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307090#M92098</link>
      <description>&lt;P&gt;@ashabc - We've converted the comment to an answer so you can accept it.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2017 05:02:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-output-of-a-stats-command/m-p/307090#M92098</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-28T05:02:48Z</dc:date>
    </item>
  </channel>
</rss>

