<?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: 2 searches with dedup returning different results when using additional explicit field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473288#M133196</link>
    <description>&lt;P&gt;Because there is the event with "Project Name"=ACTIVATION has no  "Defect ID" .&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2020 09:53:44 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-02-18T09:53:44Z</dc:date>
    <item>
      <title>2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473285#M133193</link>
      <description>&lt;P&gt;Hi, I'm running the following searches and getting different results for the same time range (All time) when comparing projects.&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;For this search, I'm getting many projects and their total unique "Defect ID"s. For the ACTIVATION project, I'm getting 23 results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" source="my_csv.csv"
| dedup "Defect ID"
| stats count  by "Project Name"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For this search, I'm getting 36 results.:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" source="my_csv.csv" "Project Name"=ACTIVATION 
| dedup "Defect ID"
| stats count  by "Project Name"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why when I'm adding the  "Project Name"=ACTIVATION to the search I'm getting MORE results?&lt;/P&gt;

&lt;P&gt;When adding the | search "Project Name"=ACTIVATION somewhere after the dedup command I'm still getting 23&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" source="my_csv.csv" "Project Name"=ACTIVATION 
| dedup "Defect ID" 
| search "Project Name"=ACTIVATION
| stats count  by "Project Name"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Feb 2020 15:21:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473285#M133193</guid>
      <dc:creator>arielofri</dc:creator>
      <dc:date>2020-02-17T15:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: 2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473286#M133194</link>
      <description>&lt;P&gt;Which  count is correct 23 OR 36? can you post some sample data of file my_csv.csv?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 16:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473286#M133194</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-17T16:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: 2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473287#M133195</link>
      <description>&lt;P&gt;I see. so, another "Project Name" has same "Defect ID" .&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 09:53:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473287#M133195</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-18T09:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: 2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473288#M133196</link>
      <description>&lt;P&gt;Because there is the event with "Project Name"=ACTIVATION has no  "Defect ID" .&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 09:53:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473288#M133196</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-18T09:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: 2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473289#M133197</link>
      <description>&lt;P&gt;All events with "Project Name"=ACTIVATION have a "Defect ID"&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 09:53:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473289#M133197</guid>
      <dc:creator>arielofri</dc:creator>
      <dc:date>2020-02-18T09:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: 2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473290#M133198</link>
      <description>&lt;P&gt;The 36 is the correct one. Unfortunately, I can't share the data.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 12:24:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473290#M133198</guid>
      <dc:creator>arielofri</dc:creator>
      <dc:date>2020-02-18T12:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: 2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473291#M133199</link>
      <description>&lt;P&gt;Instead of dedup try dc and check:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="my_index" source="my_csv.csv"
| stats dc("Defect ID") by "Project Name"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Feb 2020 13:39:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473291#M133199</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-18T13:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: 2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473292#M133200</link>
      <description>&lt;P&gt;It's working! do you know why? What the difference between the dc() and the dedup?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 13:54:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473292#M133200</guid>
      <dc:creator>arielofri</dc:creator>
      <dc:date>2020-02-18T13:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: 2 searches with dedup returning different results when using additional explicit field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473293#M133201</link>
      <description>&lt;P&gt;Reason: As @to4kawa commented above in your data another "Project Name" value has same "Defect ID". And dedup removes duplicate values for field "Defect ID" irrespective of "Project Name". Distinct count or dc returns the count of distinct values of the field "Defect ID" by "Project Name". Even below query also works for you. But you should avoid using dedup whenever possible.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="my_index" source="my_csv.csv" | dedup "Defect ID", "Project Name" | stats count  by "Project Name"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Feb 2020 15:08:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/2-searches-with-dedup-returning-different-results-when-using/m-p/473293#M133201</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-02-18T15:08:43Z</dc:date>
    </item>
  </channel>
</rss>

