<?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 splunk remove common field values after join in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/splunk-remove-common-field-values-after-join/m-p/297829#M3794</link>
    <description>&lt;P&gt;I have two indexes. I can join them and see the results based on a common field. I want to see only the results in the second index that are not part of the first index.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=BASE earliest=0
| eval LPR = strptime(LastPolicyRequest, "%m/%d/%Y %I:%M:%S %p") 
| where LPR &amp;gt;= relative_time(now(),"-7d@h")
| table "WiFiMAC","LastPolicyRequest","ValidFrom","ValidTo" 
| join type=left WiFiMAC 
    [ search BASE earliest =-48h
    | eval indextime=strftime(_indextime,"%Y-%m-%d %H:%M:%S") 
    | eval Indextime =strptime(indextime,"%Y-%m-%d %H:%M:%S.%N") 
    | eval Time =strptime(_time,"%s") 
    | eval Minutes_Diff = round((Indextime - Time)/60,2) 
    | stats avg(Minutes_Diff) as Avg_Minutes_Diff stdev(Minutes_Diff) as StDev_Minutes_Diff min(Minutes_Diff) as Min_Minutes_Diff max(Minutes_Diff) as Max_Minutes_Diff count as count by WiFiMAC 
    | eval Avg_Minutes_Diff = round(Avg_Minutes_Diff,2) 
    | rename count as "Sample Size" 
    | table "WiFiMAC", "Avg_Minutes_Diff", "StDev_Minutes_Diff", "Min_Minutes_Diff", "Max_Minutes_Diff", "Sample Size" ] 
| table "WiFiMAC", "Avg_Minutes_Diff", "StDev_Minutes_Diff", "Min_Minutes_Diff", "Max_Minutes_Diff","ValidFrom","ValidTo","LastPolicyRequest", "Sample Size"
| dedup WiFiMAC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any Ideas?&lt;/P&gt;</description>
    <pubDate>Thu, 29 Mar 2018 17:35:41 GMT</pubDate>
    <dc:creator>JoshuaJohn</dc:creator>
    <dc:date>2018-03-29T17:35:41Z</dc:date>
    <item>
      <title>splunk remove common field values after join</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/splunk-remove-common-field-values-after-join/m-p/297829#M3794</link>
      <description>&lt;P&gt;I have two indexes. I can join them and see the results based on a common field. I want to see only the results in the second index that are not part of the first index.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=BASE earliest=0
| eval LPR = strptime(LastPolicyRequest, "%m/%d/%Y %I:%M:%S %p") 
| where LPR &amp;gt;= relative_time(now(),"-7d@h")
| table "WiFiMAC","LastPolicyRequest","ValidFrom","ValidTo" 
| join type=left WiFiMAC 
    [ search BASE earliest =-48h
    | eval indextime=strftime(_indextime,"%Y-%m-%d %H:%M:%S") 
    | eval Indextime =strptime(indextime,"%Y-%m-%d %H:%M:%S.%N") 
    | eval Time =strptime(_time,"%s") 
    | eval Minutes_Diff = round((Indextime - Time)/60,2) 
    | stats avg(Minutes_Diff) as Avg_Minutes_Diff stdev(Minutes_Diff) as StDev_Minutes_Diff min(Minutes_Diff) as Min_Minutes_Diff max(Minutes_Diff) as Max_Minutes_Diff count as count by WiFiMAC 
    | eval Avg_Minutes_Diff = round(Avg_Minutes_Diff,2) 
    | rename count as "Sample Size" 
    | table "WiFiMAC", "Avg_Minutes_Diff", "StDev_Minutes_Diff", "Min_Minutes_Diff", "Max_Minutes_Diff", "Sample Size" ] 
| table "WiFiMAC", "Avg_Minutes_Diff", "StDev_Minutes_Diff", "Min_Minutes_Diff", "Max_Minutes_Diff","ValidFrom","ValidTo","LastPolicyRequest", "Sample Size"
| dedup WiFiMAC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any Ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 17:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/splunk-remove-common-field-values-after-join/m-p/297829#M3794</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2018-03-29T17:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: splunk remove common field values after join</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/splunk-remove-common-field-values-after-join/m-p/297830#M3795</link>
      <description>&lt;P&gt;Hey&lt;/P&gt;

&lt;P&gt;Let's say you WiFiMAC is the field that you use to eliminate them, you can use a strategy like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Index 2 NOT [ search index 1 | ..... | return WiFiMAC]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will show you index 2 entries that don't have any value of the index 1 entries you got in that subsearch&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 18:15:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/splunk-remove-common-field-values-after-join/m-p/297830#M3795</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-29T18:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: splunk remove common field values after join</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/splunk-remove-common-field-values-after-join/m-p/297831#M3796</link>
      <description>&lt;P&gt;... that did it. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Mar 2018 18:28:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/splunk-remove-common-field-values-after-join/m-p/297831#M3796</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2018-03-29T18:28:24Z</dc:date>
    </item>
  </channel>
</rss>

