<?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 to compare two searches to find values in one search and not the other in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-searches-to-find-values-in-one-search-and-not/m-p/490955#M137079</link>
    <description>&lt;P&gt;Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw = "list
         item1
         item2
         item3" 
| multikv forceheader=1 
| eval inList1 = "Y" 
| appendcols 
    [| makeresults 
    | eval _raw = "list
    item1
    item2
    item3
    item4
    item5" 
    | multikv forceheader=1 
    | table list] 
| eval inList2 = if(inList1 = "Y", "N", "Y") 
| where inList2 = "Y" 
| table list
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Mar 2020 05:05:39 GMT</pubDate>
    <dc:creator>anmolpatel</dc:creator>
    <dc:date>2020-03-12T05:05:39Z</dc:date>
    <item>
      <title>How to compare two searches to find values in one search and not the other</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-searches-to-find-values-in-one-search-and-not/m-p/490954#M137078</link>
      <description>&lt;P&gt;I have two datasets in separate indexes that I would like to compare.  i.e. &lt;/P&gt;

&lt;H2&gt;dataset from &lt;CODE&gt;search1&lt;/CODE&gt;:&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;item1
item2
item3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H2&gt;dataset from &lt;CODE&gt;search2&lt;/CODE&gt;:&lt;/H2&gt;

&lt;PRE&gt;&lt;CODE&gt;item1
item2
item3
item4
item5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to produce a table that gives me a table of items that exist in &lt;CODE&gt;search2&lt;/CODE&gt; and not in &lt;CODE&gt;search1&lt;/CODE&gt;. i.e. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;itemfield       searchname`
-------------------------------------
item4            search2
item5            search2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How would I do this? &lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 20:10:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-searches-to-find-values-in-one-search-and-not/m-p/490954#M137078</guid>
      <dc:creator>zachsisinst</dc:creator>
      <dc:date>2020-03-11T20:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two searches to find values in one search and not the other</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-searches-to-find-values-in-one-search-and-not/m-p/490955#M137079</link>
      <description>&lt;P&gt;Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw = "list
         item1
         item2
         item3" 
| multikv forceheader=1 
| eval inList1 = "Y" 
| appendcols 
    [| makeresults 
    | eval _raw = "list
    item1
    item2
    item3
    item4
    item5" 
    | multikv forceheader=1 
    | table list] 
| eval inList2 = if(inList1 = "Y", "N", "Y") 
| where inList2 = "Y" 
| table list
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2020 05:05:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-searches-to-find-values-in-one-search-and-not/m-p/490955#M137079</guid>
      <dc:creator>anmolpatel</dc:creator>
      <dc:date>2020-03-12T05:05:39Z</dc:date>
    </item>
  </channel>
</rss>

