<?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 for non-matched values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/553560#M157165</link>
    <description>&lt;P&gt;did you get answer for this ?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 May 2021 17:22:16 GMT</pubDate>
    <dc:creator>raghu0463</dc:creator>
    <dc:date>2021-05-28T17:22:16Z</dc:date>
    <item>
      <title>Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169062#M48271</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;Is there any way to search non-matched values from two tables like you can do on excel using VLOOKUP?&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Here is a sample table.&lt;/P&gt;

&lt;P&gt;table A            table B&lt;BR /&gt;
12345              12345&lt;BR /&gt;
23456              23456&lt;BR /&gt;
34567              34567&lt;BR /&gt;
45678              56789&lt;BR /&gt;
56789              67890&lt;BR /&gt;
67890&lt;BR /&gt;
78901&lt;BR /&gt;
89012&lt;/P&gt;

&lt;P&gt;non-matched value = 45678, 78901, 89012&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 10:26:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169062#M48271</guid>
      <dc:creator>appleman</dc:creator>
      <dc:date>2014-08-04T10:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169063#M48272</link>
      <description>&lt;P&gt;Could you provide your sample data/expected output? The requirement does seem feasible with Splunk.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 12:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169063#M48272</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-04T12:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169064#M48273</link>
      <description>&lt;P&gt;There are table A and B, and both of them have numbers(table A has more numbers than B). All numbers in table B are in table A. &lt;BR /&gt;
I want to know the numbers which are not in B but there are in A, in other words, the numbers don't match each other. &lt;BR /&gt;
Please take a look at the sample table column above. &lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 01:15:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169064#M48273</guid>
      <dc:creator>appleman</dc:creator>
      <dc:date>2014-08-05T01:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169065#M48274</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;Could you use combination "NOT", "subsearch" and "return"?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search) NOT [search (your search to get Table_B) | return [&amp;lt;count&amp;gt;] Table_A=Table_B ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the subsearch, you may get a list of Table_B.&lt;BR /&gt;&lt;BR /&gt;
And Table_B is changed to Table_A field with using "alias" feature of "return" command.&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;The "NOT" located in front of the subsearch makes negative match. &lt;/P&gt;

&lt;P&gt;So you may get the part of Table_A values which are not in Table_B.&lt;/P&gt;

&lt;P&gt;I hope it helps you.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 03:51:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169065#M48274</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2014-08-05T03:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169066#M48275</link>
      <description>&lt;P&gt;I get an error on my query....&lt;/P&gt;

&lt;P&gt;source=A (id=7* OR id=57*) id!=74* name!=&lt;EM&gt;テスト&lt;/EM&gt; name!=&lt;EM&gt;検証&lt;/EM&gt; contract_status_A=0 | dedup id | table id | search NOT [search earliest=-7d@d latest=now source=&lt;EM&gt;B (id=7&lt;/EM&gt; OR id=57*) id!=74* (type=M OR type=W) | dedup id | table id | return alias=id]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:15:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169066#M48275</guid>
      <dc:creator>appleman</dc:creator>
      <dc:date>2020-09-28T17:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169067#M48276</link>
      <description>&lt;P&gt;Could you tell me what error do you have?&lt;/P&gt;

&lt;P&gt;And could you try the following query?&lt;/P&gt;

&lt;P&gt;source=A (id=7 OR id=57) id!=74 name!=テスト name!=検証 contract_status_A=0 | dedup id | table id | search NOT [search earliest=-7d@d latest=now source=B (id=7 OR id=57) id!=74* (type=M OR type=W) | dedup id | table id | return 1000 id]&lt;/P&gt;

&lt;P&gt;You may not need to set "alias=" in your query, I think.&lt;/P&gt;

&lt;P&gt;And I'm sorry that I forget to tell you. The "return" command might be needed to set the "count" option.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:15:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169067#M48276</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2020-09-28T17:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169068#M48277</link>
      <description>&lt;P&gt;Thank you. Now I don't get an error, but I cannot get the right result.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 06:56:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169068#M48277</guid>
      <dc:creator>appleman</dc:creator>
      <dc:date>2014-08-05T06:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169069#M48278</link>
      <description>&lt;P&gt;Could you check each search result?&lt;/P&gt;

&lt;P&gt;1) &lt;BR /&gt;
source=A (id=7 OR id=57) id!=74 name!=テスト name!=検証 contract_status_A=0 | dedup id | table id&lt;/P&gt;

&lt;P&gt;2)&lt;BR /&gt;
earliest=-7d@d latest=now source=B (id=7 OR id=57) id!=74* (type=M OR type=W) | dedup id | table id&lt;/P&gt;

&lt;P&gt;I guess that you may get "id=7" or "id=57" at the maximum.&lt;BR /&gt;
Is it your expected result?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:15:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169069#M48278</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2020-09-28T17:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169070#M48279</link>
      <description>&lt;P&gt;I actually added "&lt;EM&gt;" after  "id=7" or "id=57", like "id=7&lt;/EM&gt;" or "id=57*".&lt;BR /&gt;
I got the below result.&lt;BR /&gt;
1) total count=40&lt;BR /&gt;
2) total count=27&lt;/P&gt;

&lt;P&gt;So I should get the 13 ids as a result, but I currently don't.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 07:12:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169070#M48279</guid>
      <dc:creator>appleman</dc:creator>
      <dc:date>2014-08-05T07:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169071#M48280</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Have you tried the | set diff command?&lt;/P&gt;

&lt;P&gt;With this syntax:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| set diff [search yoursearch | table tableA] [search yourothersearch | table tableB]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 08:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169071#M48280</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2014-08-05T08:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169072#M48281</link>
      <description>&lt;P&gt;Thank you. I tired it, and I got the wrong answer, the result count was 33 where it should be 13.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 09:02:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169072#M48281</guid>
      <dc:creator>appleman</dc:creator>
      <dc:date>2014-08-05T09:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169073#M48282</link>
      <description>&lt;P&gt;Make sure that the field name of the columns are the same. And try to reverse the searches:&lt;/P&gt;

&lt;P&gt;| set diff [search yourothersearch | table commonfield] [search yourothersearch | table commonfield]&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 09:28:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169073#M48282</guid>
      <dc:creator>gfuente</dc:creator>
      <dc:date>2014-08-05T09:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169074#M48283</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=A (id=7 OR id=57) id!=74 name!=テスト  name!=検証  contract_status_A=0 | stats count by id | eval source="A"
|append [search earliest=-7d@d latest=now source=B (id=7 OR id=57) id!=74* (type=M OR type=W) | stats count by id | eval source="B"]
|stats values(source) as source by id | where mvcount(source)=1 and source="A"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Aug 2014 12:41:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169074#M48283</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-05T12:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169075#M48284</link>
      <description>&lt;P&gt;There is another approach.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(source=A (id=7 OR id=57) id!=74 name!=テスト name!=検証 contract_status_A=0 ) 
OR (earliest=-7d@d latest=now source=B (id=7 OR id=57) id!=74* (type=M OR type=W))
| stats count count(eval(source="A")) AS A count(eval(source="B")) AS B by id
| search B=0 A&amp;gt;0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you cannot get your expected result, could you try to remove "|search B=0 A&amp;gt;0"?&lt;BR /&gt;&lt;BR /&gt;
You may know how Splunk handles your data. And if you share it with us, I will help you more.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2014 00:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169075#M48284</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2014-08-06T00:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169076#M48285</link>
      <description>&lt;P&gt;It actually solve my question. Thank you very much!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2014 08:54:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/169076#M48285</guid>
      <dc:creator>appleman</dc:creator>
      <dc:date>2014-08-08T08:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search for non-matched values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/553560#M157165</link>
      <description>&lt;P&gt;did you get answer for this ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 May 2021 17:22:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-for-non-matched-values/m-p/553560#M157165</guid>
      <dc:creator>raghu0463</dc:creator>
      <dc:date>2021-05-28T17:22:16Z</dc:date>
    </item>
  </channel>
</rss>

