<?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: I need help me using dedup and dc count? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501918#M139711</link>
    <description>&lt;P&gt;can you share a sample event/s?&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2020 20:55:16 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2020-03-27T20:55:16Z</dc:date>
    <item>
      <title>I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501914#M139707</link>
      <description>&lt;P&gt;I have the following search based on this i just want to see unique values for the search &lt;/P&gt;

&lt;P&gt;index=one eventtype=one_tu&lt;BR /&gt;
| sort -time, ComputerName&lt;BR /&gt;
| dedup id&lt;BR /&gt;
|stat dc(id) as ID&lt;BR /&gt;
| search open=false&lt;BR /&gt;
| table Date, ComputerName, agentName, class,Content,id&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 19:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501914#M139707</guid>
      <dc:creator>sunnyft</dc:creator>
      <dc:date>2020-03-27T19:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501915#M139708</link>
      <description>&lt;P&gt;your &lt;CODE&gt;stats dc(id) as ID&lt;/CODE&gt; takes away all other fields &lt;BR /&gt;
if i understand your needs, try this:&lt;BR /&gt;
&lt;CODE&gt;index = one eventtype=one_tu open=false | stats values(id) as all_ids&lt;/CODE&gt;&lt;BR /&gt;
if you want to see it with other fields context, add a &lt;CODE&gt;by&lt;/CODE&gt; clause for your stats command&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 19:39:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501915#M139708</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2020-03-27T19:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501916#M139709</link>
      <description>&lt;P&gt;Tried using this as well but no results &lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 20:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501916#M139709</guid>
      <dc:creator>sunnyft</dc:creator>
      <dc:date>2020-03-27T20:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501917#M139710</link>
      <description>&lt;P&gt;under statistics i get 0 count however, if i don't use stats value I see the results but i want to get unique count  so still need help&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 20:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501917#M139710</guid>
      <dc:creator>sunnyft</dc:creator>
      <dc:date>2020-03-27T20:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501918#M139711</link>
      <description>&lt;P&gt;can you share a sample event/s?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 20:55:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501918#M139711</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2020-03-27T20:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501919#M139712</link>
      <description>&lt;P&gt;may be i dont even need to use stat dc, I am getting answers when i use this | stats values(id) as -__Name however the table is empty i was trying to do to get rid off duplicate Name even if it is by different user, I am not even sure if i need to use Stats dc but  I dont want to see duplicate value in the table &lt;/P&gt;

&lt;P&gt;if i dont use | stats values(id) as -__Name i'm getting results but duplicate as well &lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 21:04:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501919#M139712</guid>
      <dc:creator>sunnyft</dc:creator>
      <dc:date>2020-03-27T21:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501920#M139713</link>
      <description>&lt;P&gt;I wan to add the info in the table without duplicate &lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 21:11:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501920#M139713</guid>
      <dc:creator>sunnyft</dc:creator>
      <dc:date>2020-03-27T21:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501921#M139714</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=one eventtype=one_tu open="false"
| fields Date ComputerName  agentName  class Content id
| stats values(*) as * by id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Stats"&gt;reference&lt;/A&gt;:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;by-clause

&lt;UL&gt;
&lt;LI&gt;Syntax: BY &lt;/LI&gt;
&lt;LI&gt;Description: The name of one or more fields to group by. You cannot use a wildcard character to specify multiple fields with similar names. You must specify each field separately. The BY clause returns &lt;STRONG&gt;one row for each distinct value&lt;/STRONG&gt; in the BY clause fields. If no BY clause is specified, the stats command returns only one row, which is the aggregation over the entire incoming result set.&lt;/LI&gt;
&lt;/UL&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;If you want to display fields by each &lt;CODE&gt;id&lt;/CODE&gt; , try my query.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2020 01:20:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501921#M139714</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-28T01:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501922#M139715</link>
      <description>&lt;P&gt;Hi @sunnyft,&lt;/P&gt;

&lt;P&gt;I think you're looking for something like this : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=one eventtype=one_tu  open=false
| sort -time, ComputerName
| dedup id
|stats dc(id) as ID by Date, ComputerName, agentName, class,Content
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if that helps !&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2020 07:41:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501922#M139715</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2020-03-28T07:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501923#M139716</link>
      <description>&lt;P&gt;No it didn't work I am not able to see the any Statistics &lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2020 16:21:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501923#M139716</guid>
      <dc:creator>sunnyft</dc:creator>
      <dc:date>2020-03-28T16:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501924#M139717</link>
      <description>&lt;P&gt;Never use &lt;CODE&gt;sort&lt;/CODE&gt; without a number.  There is no need to use both; try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=one eventtype=one_tu
| sort 0 -time, ComputerName
| dedup id
| search open="false"
| table Date, ComputerName, agentName, class,Content,id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 Mar 2020 19:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501924#M139717</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-28T19:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: I need help me using dedup and dc count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501925#M139718</link>
      <description>&lt;P&gt;Try using this first : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=one eventtype=one_tu  open=false
 | sort -time, ComputerName
 | dedup id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Does it give you anything ?&lt;BR /&gt;
If so, could you please check if you have the following fields : Date, ComputerName, agentName, class,Content ?&lt;/P&gt;

&lt;P&gt;Could be that you don't have a field called Date ? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=one eventtype=one_tu  open=false
 | dedup id
 |stats dc(id) as ID, values(agentName) as agentName, values(class) as class, values(Content) as Content by _time, ComputerName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 29 Mar 2020 03:23:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-need-help-me-using-dedup-and-dc-count/m-p/501925#M139718</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2020-03-29T03:23:37Z</dc:date>
    </item>
  </channel>
</rss>

