<?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 Perform stats on full data and deduplicated data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Perform-stats-on-full-data-and-deduplicated-data/m-p/56587#M13863</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I need to present a simple couple of counts on some IIS logs. One count will be raw, total hits, the other will be deduplicated by the user to show unique users. The following 2 commands work individually:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"search to return the data" | stats count as TotalHits by cs_uri_stem | table cs_uri_stem, TotalHits 

"search to return the data" | dedup cs_username | stats count as UniqueHits by cs_uri_stem | table cs_uri_stem, UniqueHits 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;however I get no results when I bring them togther. I presume this is because the stats command throws columns away but I'm not sure how to overcome it. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"search to return the data" | stats count as TotalHits by cs_uri_stem | dedup cs_username | stats count as UniqueHits by cs_uri_stem | table cs_uri_stem, TotalHits , UniqueHits 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Mon, 21 May 2012 14:50:44 GMT</pubDate>
    <dc:creator>Bulluk</dc:creator>
    <dc:date>2012-05-21T14:50:44Z</dc:date>
    <item>
      <title>Perform stats on full data and deduplicated data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Perform-stats-on-full-data-and-deduplicated-data/m-p/56587#M13863</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I need to present a simple couple of counts on some IIS logs. One count will be raw, total hits, the other will be deduplicated by the user to show unique users. The following 2 commands work individually:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"search to return the data" | stats count as TotalHits by cs_uri_stem | table cs_uri_stem, TotalHits 

"search to return the data" | dedup cs_username | stats count as UniqueHits by cs_uri_stem | table cs_uri_stem, UniqueHits 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;however I get no results when I bring them togther. I presume this is because the stats command throws columns away but I'm not sure how to overcome it. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"search to return the data" | stats count as TotalHits by cs_uri_stem | dedup cs_username | stats count as UniqueHits by cs_uri_stem | table cs_uri_stem, TotalHits , UniqueHits 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2012 14:50:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Perform-stats-on-full-data-and-deduplicated-data/m-p/56587#M13863</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2012-05-21T14:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Perform stats on full data and deduplicated data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Perform-stats-on-full-data-and-deduplicated-data/m-p/56588#M13864</link>
      <description>&lt;P&gt;If all you want from the second search is to get a distinct usercount, just use &lt;CODE&gt;distinct_count&lt;/CODE&gt; or &lt;CODE&gt;dc&lt;/CODE&gt; which is the short form:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats count as TotalHits,dc(cs_username) as UniqueHits by cs_uri_stem | table cs_uri_stem TotalHits UniqueHits
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 May 2012 15:01:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Perform-stats-on-full-data-and-deduplicated-data/m-p/56588#M13864</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-05-21T15:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Perform stats on full data and deduplicated data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Perform-stats-on-full-data-and-deduplicated-data/m-p/56589#M13865</link>
      <description>&lt;P&gt;It's easy when you know how &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thanks for such a quick response!&lt;/P&gt;</description>
      <pubDate>Mon, 21 May 2012 15:03:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Perform-stats-on-full-data-and-deduplicated-data/m-p/56589#M13865</guid>
      <dc:creator>Bulluk</dc:creator>
      <dc:date>2012-05-21T15:03:41Z</dc:date>
    </item>
  </channel>
</rss>

