<?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: Why does the &amp;quot;tstats count&amp;quot; and &amp;quot;tstats values&amp;quot; generate a different event count? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-quot-tstats-count-quot-and-quot-tstats-values-quot/m-p/417340#M120087</link>
    <description>&lt;P&gt;&lt;EM&gt;count(X)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;
This function returns the number of occurrences of the field X. &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;values(X)&lt;/EM&gt; &lt;BR /&gt;
This function returns the list of all distinct values of the field X as a multi-value entry. The order of the values is lexicographical.&lt;/P&gt;

&lt;P&gt;this is from stats command page.. this will be applicable for tstats as well, i think&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;As you are a new user to Splunk Answers, you can upvote the answers/comments, &lt;BR /&gt;
if this answer resolved your query, you can select this answer and "accept" it as the answer, so that this question will be moved to answered queue. Happy Splunking!&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Dec 2018 05:21:06 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2018-12-03T05:21:06Z</dc:date>
    <item>
      <title>Why does the "tstats count" and "tstats values" generate a different event count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-quot-tstats-count-quot-and-quot-tstats-values-quot/m-p/417339#M120086</link>
      <description>&lt;P&gt;I have 2 queries:&lt;BR /&gt;
|tstats values(sth.sth) as sth... |stats count by sth | ...&lt;/P&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;P&gt;|tstats count from datamodel=sth ... | stats count by sth |...&lt;/P&gt;

&lt;P&gt;both give me a different event count. Just want to know why that is the case.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 03:12:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-quot-tstats-count-quot-and-quot-tstats-values-quot/m-p/417339#M120086</guid>
      <dc:creator>eugenezxq</dc:creator>
      <dc:date>2018-12-03T03:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why does the "tstats count" and "tstats values" generate a different event count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-the-quot-tstats-count-quot-and-quot-tstats-values-quot/m-p/417340#M120087</link>
      <description>&lt;P&gt;&lt;EM&gt;count(X)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;
This function returns the number of occurrences of the field X. &lt;/P&gt;

&lt;P&gt;&lt;EM&gt;values(X)&lt;/EM&gt; &lt;BR /&gt;
This function returns the list of all distinct values of the field X as a multi-value entry. The order of the values is lexicographical.&lt;/P&gt;

&lt;P&gt;this is from stats command page.. this will be applicable for tstats as well, i think&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;As you are a new user to Splunk Answers, you can upvote the answers/comments, &lt;BR /&gt;
if this answer resolved your query, you can select this answer and "accept" it as the answer, so that this question will be moved to answered queue. Happy Splunking!&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 05:21:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-the-quot-tstats-count-quot-and-quot-tstats-values-quot/m-p/417340#M120087</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2018-12-03T05:21:06Z</dc:date>
    </item>
  </channel>
</rss>

