<?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: Remove duplicate values with same data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263472#M79098</link>
    <description>&lt;P&gt;Try like this &lt;CODE&gt;| dedup policyNumber Stage Premium&lt;/CODE&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2016 04:13:34 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-09-01T04:13:34Z</dc:date>
    <item>
      <title>Remove duplicate values with same data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263471#M79097</link>
      <description>&lt;P&gt;I am attempting to remove duplicate occurrences from a results table.&lt;/P&gt;

&lt;P&gt;What I have&lt;BR /&gt;
ID 1 NewBusiness $123&lt;BR /&gt;
ID 1 NewBusiness $123 *&lt;BR /&gt;
ID 1 Endorsement $156&lt;BR /&gt;
ID 1 Endorsement $0.00&lt;BR /&gt;
ID 1 Endorsement $0.00&lt;BR /&gt;
ID 1 Close $279.00&lt;BR /&gt;
ID 1 Close $279.00 *&lt;/P&gt;

&lt;P&gt;What I would like to get too.&lt;BR /&gt;
ID 1 NewBusiness $123&lt;BR /&gt;
ID 1 Endorsement $156&lt;BR /&gt;
ID 1 Endorsement $0.00&lt;BR /&gt;
ID 1 Endorsement $0.00&lt;BR /&gt;
ID 1 Close $279.00&lt;/P&gt;

&lt;P&gt;The values marked with * are the duplicates I am trying to remove. The end game is to remove the duplicates for NewBusiness and Close whilst keep duplicates for Endorsement.&lt;/P&gt;

&lt;P&gt;The field values are policyNumber (ID 1)  / Stage (Close)  / Premium ($123)&lt;/P&gt;

&lt;P&gt;As you can see from the above it is not possible (at least I don't think it is) to use the dedup command as there is no one item to de duplicate on. &lt;/P&gt;

&lt;P&gt;Is there anyway of achieving what I am trying to achieve ? &lt;/P&gt;

&lt;P&gt;Cheers.&lt;/P&gt;

&lt;P&gt;Alastair &lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 04:08:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263471#M79097</guid>
      <dc:creator>ahogbin</dc:creator>
      <dc:date>2016-09-01T04:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate values with same data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263472#M79098</link>
      <description>&lt;P&gt;Try like this &lt;CODE&gt;| dedup policyNumber Stage Premium&lt;/CODE&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 04:13:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263472#M79098</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-01T04:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate values with same data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263473#M79099</link>
      <description>&lt;P&gt;But that will also remove the duplicate stage of Endorsement (which I want to keep.&lt;/P&gt;

&lt;P&gt;In any policyNumber there should only ever be 1 NewBusiness, 1 Close but there can be multiple endorsements (I I need to keep these)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 04:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263473#M79099</guid>
      <dc:creator>ahogbin</dc:creator>
      <dc:date>2016-09-01T04:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate values with same data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263474#M79100</link>
      <description>&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your base search&amp;gt;|streamstats count current=t reset_on_change=true by policyNumber Stage|where Stage=="Endorsement" OR count==1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please refine the by clause fields according to your final requirement&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 05:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263474#M79100</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2016-09-01T05:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Remove duplicate values with same data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263475#M79101</link>
      <description>&lt;P&gt;Perfect... thank you so much. I cannot say how much this has helped.&lt;BR /&gt;
Cheers&lt;BR /&gt;
Alastair&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2016 06:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-duplicate-values-with-same-data/m-p/263475#M79101</guid>
      <dc:creator>ahogbin</dc:creator>
      <dc:date>2016-09-01T06:26:59Z</dc:date>
    </item>
  </channel>
</rss>

