<?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 command filtering not providing accurate results in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542452#M8817</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226742"&gt;@Mary666&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please try using below search;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="vc_xyz_idx") OR (index="xp_zzz_summary_idx") 
| stats dc(index) as count values(index) as indexes by docNum
| where count=1 AND indexes!="xp_zzz_summary_idx"&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 05 Mar 2021 05:33:07 GMT</pubDate>
    <dc:creator>scelikok</dc:creator>
    <dc:date>2021-03-05T05:33:07Z</dc:date>
    <item>
      <title>Search command filtering not providing accurate results</title>
      <link>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542436#M8816</link>
      <description>&lt;P&gt;Hello Splunk Community,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have two indexes: index=vc_xyz_idx&amp;nbsp; and index=xp_zzz_summary_idx and I am checking to see if a value named docNum is in the&amp;nbsp;index=xp_zzz_summary_idx. The docNum should be in both indexes, &lt;STRONG&gt;but I am only interested in the docNum missing from&amp;nbsp;index=xp_zzz_summary_idx&lt;/STRONG&gt; .&amp;nbsp; I have created two eval's and renamed the indexes, since they both have the same field name - index. The issue is that I am getting false negatives. I have put in&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;| search Missing_in_Blue="No"&amp;nbsp;&lt;/STRONG&gt; because I only want the docNum that is missing in &lt;STRONG&gt;index=xp_zzz_summary_idx&lt;/STRONG&gt;, but I get docNum that is actually in the&amp;nbsp;&amp;nbsp;index=xp_zzz_summary_idx. Can someone please help?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="vc_xyz_idx")  OR (index="xp_zzz_summary_idx") | eval Blue=case(index=index="xp_zzz_summary_idx", docNum), Missing_in_Blue=if(docNum==xp_zzz_summary_idx, "Yes", "No") | search Missing_in_Blue="No"  | stats values(Missing_in_Blue) as Missing_in_Blue by docNum&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 02:10:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542436#M8816</guid>
      <dc:creator>Mary666</dc:creator>
      <dc:date>2021-03-05T02:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Search command filtering not providing accurate results</title>
      <link>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542452#M8817</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226742"&gt;@Mary666&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Please try using below search;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index="vc_xyz_idx") OR (index="xp_zzz_summary_idx") 
| stats dc(index) as count values(index) as indexes by docNum
| where count=1 AND indexes!="xp_zzz_summary_idx"&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Mar 2021 05:33:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542452#M8817</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-03-05T05:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: Search command filtering not providing accurate results</title>
      <link>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542470#M8818</link>
      <description>&lt;P&gt;Thanks! this seems to have worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question why&amp;nbsp;&amp;nbsp;use dc and name as count - just curious about your thought process here:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dc(index) as count&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 07:29:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542470#M8818</guid>
      <dc:creator>Mary666</dc:creator>
      <dc:date>2021-03-05T07:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Search command filtering not providing accurate results</title>
      <link>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542475#M8819</link>
      <description>&lt;P&gt;Nice to know it helped you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Since there are many events count would be unpredicted number, that is why I used dc (distinct count) which will result 1 or 2 for sure. I just used count as a name to use in further commands easier.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 07:39:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542475#M8819</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-03-05T07:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Search command filtering not providing accurate results</title>
      <link>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542479#M8820</link>
      <description>&lt;P&gt;Mainly just want to know why you used dc instead of values...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 07:49:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542479#M8820</guid>
      <dc:creator>Mary666</dc:creator>
      <dc:date>2021-03-05T07:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Search command filtering not providing accurate results</title>
      <link>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542481#M8821</link>
      <description>&lt;P&gt;Yes, this is exactly what I was struggling with - the count issue, since the count could be 1 or 2 for the index and I only needed those where the count=1 and I see how dc helped with that. Thanks for clarifying this for me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 07:55:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Search-command-filtering-not-providing-accurate-results/m-p/542481#M8821</guid>
      <dc:creator>Mary666</dc:creator>
      <dc:date>2021-03-05T07:55:24Z</dc:date>
    </item>
  </channel>
</rss>

