<?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: How to remove duplicate column values in table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99783#M25740</link>
    <description>&lt;P&gt;It doesn't produce the table I'm looking for unfortunately.  What I get from your suggestion is:&lt;/P&gt;

&lt;P&gt;timestamp,region,product_number,status,count&lt;BR /&gt;
time1,        ,12345,done,5&lt;BR /&gt;
time2,        ,23456,fail,4&lt;BR /&gt;
time3,emea,34567,done,3&lt;BR /&gt;
time4,emea,56789,fail,1&lt;BR /&gt;
time5,emea,     ,done,2&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2013 23:55:11 GMT</pubDate>
    <dc:creator>the_wolverine</dc:creator>
    <dc:date>2013-07-18T23:55:11Z</dc:date>
    <item>
      <title>How to remove duplicate column values in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99781#M25738</link>
      <description>&lt;P&gt;I have a table that contains several columns.  The table looks something like this:&lt;/P&gt;

&lt;P&gt;timestamp,region,product_number,status,count&lt;BR /&gt;
time1,americas,12345,done,5&lt;BR /&gt;
time2,americas,23456,fail,4&lt;BR /&gt;
time3,emea,34567,done,3&lt;BR /&gt;
time4,emea,56789,fail,1&lt;BR /&gt;
time5,emea,56789,done,2&lt;/P&gt;

&lt;P&gt;I would like to reformat it to remove the column values that are duplicated:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;timestamp,region,product_number,status,count
time1,americas,12345,done,5
time2,        ,23456,fail,4
time3,emea,34567,done,3
time4,    ,56789,fail,1
time5,    ,     ,done,2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jul 2013 17:06:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99781#M25738</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2013-07-18T17:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove duplicate column values in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99782#M25739</link>
      <description>&lt;P&gt;I don't think there's a generic solution to remove "duplicates" in &lt;EM&gt;any&lt;/EM&gt; field (at least I can't think of one), but if it's OK to specify fields you could achieve this with &lt;CODE&gt;streamstats&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | streamstats current=f last(region) as _lastregion, last(product_number) as _last_product_number | eval region=if(region==_lastregion,"",region) | eval product_number=if(product_number==_last_product_number,"",product_number) | ... (and so on)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jul 2013 18:38:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99782#M25739</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-07-18T18:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove duplicate column values in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99783#M25740</link>
      <description>&lt;P&gt;It doesn't produce the table I'm looking for unfortunately.  What I get from your suggestion is:&lt;/P&gt;

&lt;P&gt;timestamp,region,product_number,status,count&lt;BR /&gt;
time1,        ,12345,done,5&lt;BR /&gt;
time2,        ,23456,fail,4&lt;BR /&gt;
time3,emea,34567,done,3&lt;BR /&gt;
time4,emea,56789,fail,1&lt;BR /&gt;
time5,emea,     ,done,2&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2013 23:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99783#M25740</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2013-07-18T23:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove duplicate column values in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99784#M25741</link>
      <description>&lt;P&gt;have you considered using selfjoin on region?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2013 22:15:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99784#M25741</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2013-07-19T22:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove duplicate column values in table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99785#M25742</link>
      <description>&lt;P&gt;Um, it works.  Turns out I had bad data.  Thanks, Ayn!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2013 23:00:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-duplicate-column-values-in-table/m-p/99785#M25742</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2013-07-24T23:00:34Z</dc:date>
    </item>
  </channel>
</rss>

