<?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: splunk query help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-help/m-p/467656#M131627</link>
    <description>&lt;P&gt;Hi @surekhasplunk,&lt;BR /&gt;
you cannot filter events in the main search because, in this way, you cannot identify the Devices to exclude, try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=ABC 
| stats values(Device) AS Device count by Check
| where Check!=D 
| mvexpand Device
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You need of mvexpand command because you could have more than one value in Device field.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jun 2020 06:58:54 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-06-01T06:58:54Z</dc:date>
    <item>
      <title>splunk query help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-help/m-p/467655#M131626</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=ABC Check!=D 
| stats count by Device Check
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am using this query and getting Device and Related Checks reported by the device.&lt;/P&gt;

&lt;P&gt;Now i have a scenario where i need to show only those devices where the Check!=D &lt;BR /&gt;
And i have data like below &lt;/P&gt;

&lt;P&gt;Device    Check&lt;BR /&gt;
india_1   A&lt;BR /&gt;
india_1   D&lt;BR /&gt;
india_2   B&lt;BR /&gt;
india_3   B&lt;BR /&gt;
india_3   C&lt;BR /&gt;
india_4   A&lt;BR /&gt;
india_4   D&lt;/P&gt;

&lt;P&gt;output i want is only below 2 devices where D is not there in the check although we have other names in the Check. &lt;BR /&gt;
Device    count&lt;BR /&gt;
india_2    1&lt;BR /&gt;
india_3    2&lt;/P&gt;

&lt;P&gt;please help me with the query &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-help/m-p/467655#M131626</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2020-09-30T05:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-help/m-p/467656#M131627</link>
      <description>&lt;P&gt;Hi @surekhasplunk,&lt;BR /&gt;
you cannot filter events in the main search because, in this way, you cannot identify the Devices to exclude, try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=ABC 
| stats values(Device) AS Device count by Check
| where Check!=D 
| mvexpand Device
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You need of mvexpand command because you could have more than one value in Device field.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 06:58:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-help/m-p/467656#M131627</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-06-01T06:58:54Z</dc:date>
    </item>
  </channel>
</rss>

