<?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: Subsearch with multiple field matching in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-with-multiple-field-matching/m-p/138794#M38121</link>
    <description>&lt;P&gt;One option can be to use join&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=charlesriver sourcetype=CrdApp_Events EVENT=LOGIN 
| bucket span=1d _time 
| stats count first(_time) as Date by USER 
| join Date,USER  [search index=charlesriver sourcetype=CrdApp_Users 
   | bucket span=1d _time 
   | stats count first(_time) as Date by USER_NAME
   | table USER_NAME,Date|rename USER_NAME as USER |eval filter=1]
|where NOT filter=1 | fields - filter
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Nov 2013 16:32:18 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2013-11-12T16:32:18Z</dc:date>
    <item>
      <title>Subsearch with multiple field matching</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-with-multiple-field-matching/m-p/138792#M38119</link>
      <description>&lt;P&gt;Everyday I bring in events (with a logon id, USER below) and a list of approved users. I want to compare the 2 lists together and show unmatched USER fields, but only for the same date between the event list and the approved users list comes in. Currently I am matching but I seem to be joining across all dates. How do I limit the join to only the same date (and USER)?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=charlesriver sourcetype=CrdApp_Events EVENT=LOGIN 
| bucket span=1d _time 
| stats count first(_time) as Date by USER 
| search NOT 
   [search index=charlesriver sourcetype=CrdApp_Users 
   | bucket span=1d _time 
   | stats count first(_time) as Date by USER_NAME
   | table USER_NAME|rename USER_NAME as USER]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Nov 2013 15:58:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-with-multiple-field-matching/m-p/138792#M38119</guid>
      <dc:creator>andrewkenth</dc:creator>
      <dc:date>2013-11-12T15:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch with multiple field matching</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-with-multiple-field-matching/m-p/138793#M38120</link>
      <description>&lt;P&gt;Can you try like this (added Date field in subsearch) &lt;/P&gt;

&lt;P&gt;index=charlesriver sourcetype=CrdApp_Events EVENT=LOGIN | bucket span=1d _time | stats count first(_time) as Date by USER |search NOT [search index=charlesriver sourcetype=CrdApp_Users | bucket span=1d _time | stats count first(_time) as Date by USER_NAME| table Date,USER_NAME|rename USER_NAME as USER]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:15:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-with-multiple-field-matching/m-p/138793#M38120</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-28T15:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearch with multiple field matching</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearch-with-multiple-field-matching/m-p/138794#M38121</link>
      <description>&lt;P&gt;One option can be to use join&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=charlesriver sourcetype=CrdApp_Events EVENT=LOGIN 
| bucket span=1d _time 
| stats count first(_time) as Date by USER 
| join Date,USER  [search index=charlesriver sourcetype=CrdApp_Users 
   | bucket span=1d _time 
   | stats count first(_time) as Date by USER_NAME
   | table USER_NAME,Date|rename USER_NAME as USER |eval filter=1]
|where NOT filter=1 | fields - filter
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Nov 2013 16:32:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearch-with-multiple-field-matching/m-p/138794#M38121</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-12T16:32:18Z</dc:date>
    </item>
  </channel>
</rss>

