<?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 Stats Count not returning expected Results - Difference in count over single date and span covering same date in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286021#M86553</link>
    <description>&lt;P&gt;HI Guys,&lt;/P&gt;

&lt;P&gt;Just noticed something a little strange, &lt;BR /&gt;
I am running a query to cont the number of a certain transaction.&lt;BR /&gt;
When I run this query for a set date say the 23rd of June, it returns about 5.5k results.&lt;BR /&gt;
Yet if I run the query with a time chart over the span of 1 month, It returns double the results in the count.&lt;BR /&gt;
When I click into the events from this search it shows the original number as returned by the search of just that day.&lt;/P&gt;

&lt;P&gt;Would someone be able to answer why this occurs?&lt;BR /&gt;
Search query for the single day is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest|stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and for the monthly one I run:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest|timechart count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;any help appreciated.&lt;BR /&gt;
Thanks&lt;BR /&gt;
Steve&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2016 09:34:29 GMT</pubDate>
    <dc:creator>insaneteddie</dc:creator>
    <dc:date>2016-07-28T09:34:29Z</dc:date>
    <item>
      <title>Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286021#M86553</link>
      <description>&lt;P&gt;HI Guys,&lt;/P&gt;

&lt;P&gt;Just noticed something a little strange, &lt;BR /&gt;
I am running a query to cont the number of a certain transaction.&lt;BR /&gt;
When I run this query for a set date say the 23rd of June, it returns about 5.5k results.&lt;BR /&gt;
Yet if I run the query with a time chart over the span of 1 month, It returns double the results in the count.&lt;BR /&gt;
When I click into the events from this search it shows the original number as returned by the search of just that day.&lt;/P&gt;

&lt;P&gt;Would someone be able to answer why this occurs?&lt;BR /&gt;
Search query for the single day is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest|stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and for the monthly one I run:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest|timechart count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;any help appreciated.&lt;BR /&gt;
Thanks&lt;BR /&gt;
Steve&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 09:34:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286021#M86553</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-07-28T09:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286022#M86554</link>
      <description>&lt;P&gt;By default, the &lt;CODE&gt;timechart&lt;/CODE&gt; command will create "empty events" for timeslots with no data so that the spacing on the visualization will be even on the X-Axis.  I assume this is what you are noticing.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 13:54:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286022#M86554</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-28T13:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286023#M86555</link>
      <description>&lt;P&gt;This would result in a double the number of events counted?&lt;BR /&gt;
Like in my issue when I count the single day events it shows roughly 5.5k.&lt;BR /&gt;
Yet when I run the monthly time chart search, it counts 11k roughly. as that days number of events.&lt;BR /&gt;
I click into show events that returns the 11k and it resolves to 5.5k results on the day.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 14:47:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286023#M86555</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-07-28T14:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286024#M86556</link>
      <description>&lt;P&gt;Are you saying that the field &lt;CODE&gt;count&lt;/CODE&gt; is doubled?  That makes no sense to me.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 15:33:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286024#M86556</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-28T15:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286025#M86557</link>
      <description>&lt;P&gt;yeah exactly, so my daily search returns a number or 5326 for the 23rd of June.&lt;BR /&gt;
yet my search for the entire month of June, on the 23rd shows 10652.&lt;BR /&gt;
I have this same issue for the following day as well. Yet all the rest of the days of the month or displayed as they should be - counts from timechart search match count from daily count.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2016 15:40:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286025#M86557</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-07-28T15:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286026#M86558</link>
      <description>&lt;P&gt;Can you try this to see if that makes any difference&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=myComputer- index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest | bucket span=1d _time | stats count by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2016 20:17:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286026#M86558</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-28T20:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286027#M86559</link>
      <description>&lt;P&gt;Nope still the same. &lt;BR /&gt;
Returns the double value in the statistics tab, for count as 10652, and if I click into the day in questions events, 23rd of June, that  returns the correct count of 5326.&lt;/P&gt;

&lt;P&gt;Thanks for the input. It is a puzzling issue.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 08:20:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286027#M86559</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-07-29T08:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286028#M86560</link>
      <description>&lt;P&gt;If I change the monthly timechart search to a | stats count by date &lt;BR /&gt;
 it still returns the same wrong result for the dates in question.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 08:49:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286028#M86560</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-07-29T08:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286029#M86561</link>
      <description>&lt;P&gt;The issue is surely that in &lt;CODE&gt;chart&lt;/CODE&gt; case you are using &lt;CODE&gt;date&lt;/CODE&gt; but in the &lt;CODE&gt;timechart&lt;/CODE&gt; case you are using &lt;CODE&gt;_time&lt;/CODE&gt;.  If the &lt;CODE&gt;date&lt;/CODE&gt; field is a &lt;CODE&gt;multi-valued&lt;/CODE&gt; field with 2 values, then this will cause doubling.  Is this what is happening?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jul 2016 15:03:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286029#M86561</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-30T15:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286030#M86562</link>
      <description>&lt;P&gt;my understanding was the timechart was charting over a period of time, in this case a month, and creating buckets of 1 day for each of the 30.*.&lt;BR /&gt;
if I do a stats count on that given date 23rd of June, it returns one result.&lt;BR /&gt;
If i do a stats count by date (buckets of 1 day) over the month, i get the same doubled results.&lt;BR /&gt;
Even if it was counting double when I click into show events surely then it would have doubled events ? rather than just the half the count value?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 08:15:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286030#M86562</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-08-01T08:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286031#M86563</link>
      <description>&lt;P&gt;Could you try reducing the timerange of the time chart to 3 days or 7 days (including 23 Jun) and see if the behavior changes?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2016 16:19:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286031#M86563</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-01T16:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286032#M86564</link>
      <description>&lt;P&gt;The behaviour did indeed change, if I ran the time chart search over seven days the results where what the count for just the 23rd showed. &lt;BR /&gt;
Any ideas why?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 11:53:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286032#M86564</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-08-03T11:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286033#M86565</link>
      <description>&lt;P&gt;Thought I had responded to this already, sorry for the delay.&lt;BR /&gt;
Yeah it does change it seems to be anything over 14days and it doubles some results.&lt;BR /&gt;
Any idea why this is happening?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 12:10:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286033#M86565</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-08-16T12:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286034#M86566</link>
      <description>&lt;P&gt;I wonder if you should specify the &lt;CODE&gt;span&lt;/CODE&gt; too. I don't know how the default &lt;CODE&gt;span&lt;/CODE&gt; is chosen, but for a month, it is normally 1 day in my experience, but perhaps you want to try and set it? If the &lt;CODE&gt;span&lt;/CODE&gt; chosen by default is longer than 1 day, the timechart normally visualizes this with the first date and/or time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest|timechart span=1d count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Aug 2016 07:45:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286034#M86566</guid>
      <dc:creator>echalex</dc:creator>
      <dc:date>2016-08-17T07:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286035#M86567</link>
      <description>&lt;P&gt;I tried specifying the span already and it made no difference. The results for that date and the following day were doubled, I have tried re centering my search too, as in to move the 23rd to earlier in the time frame and it still appears to be doubled until you click into the events.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 11:46:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286035#M86567</guid>
      <dc:creator>insaneteddie</dc:creator>
      <dc:date>2016-08-17T11:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286036#M86568</link>
      <description>&lt;P&gt;If you are using a index cluster ensure that your search head is configured to talk to the cluster master and using mode=searchhead in server.conf (please see docs for all details). Do not add the indexers in the index cluster as search peers.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jul 2017 16:24:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286036#M86568</guid>
      <dc:creator>ejenson_splunk</dc:creator>
      <dc:date>2017-07-19T16:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Count not returning expected Results - Difference in count over single date and span covering same date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286037#M86569</link>
      <description>&lt;P&gt;This is almost always the result of either a multivalue field or (this other odd situation I ran into with event logging...)&lt;/P&gt;

&lt;P&gt;Compare these... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest | table _time |stats count

 host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest| table _time | timechart count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If either of those is still doubled, compare &lt;CODE&gt;| table _raw&lt;/CODE&gt; instead, and/or try this format.   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest | stats count(_raw)

 host=myComputer-* index=index "KeyPhrase" success=True NOT (Content=Test1 OR Content=Test2) Crm=myRequest | timechart count(_raw)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Jul 2017 22:33:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Stats-Count-not-returning-expected-Results-Difference-in-count/m-p/286037#M86569</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-19T22:33:47Z</dc:date>
    </item>
  </channel>
</rss>

