<?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 i am finding count difference in timechart function in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295041#M89043</link>
    <description>&lt;P&gt;Hi daljeanis,&lt;/P&gt;

&lt;P&gt;This is my search,&lt;/P&gt;

&lt;P&gt;index=qranges|fillnull value=Null|search Name="*"|join type=left IP [search index=rranges |stats count by sas _time]|stats count by sas _time|bin span=1d _time|stats sum(count) by  sas&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2017 08:08:22 GMT</pubDate>
    <dc:creator>umsundar2015</dc:creator>
    <dc:date>2017-10-13T08:08:22Z</dc:date>
    <item>
      <title>why i am finding count difference in timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295038#M89040</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;When i run a search for 7 days , i am getting correct count for all 7 days .But when i run for 30 days then i am finding difference in count .I am left joining 2 indexes and finally i am using timechart command.&lt;BR /&gt;
Please can anyone help me out &lt;/P&gt;

&lt;P&gt;thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 09:23:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295038#M89040</guid>
      <dc:creator>umsundar2015</dc:creator>
      <dc:date>2017-10-12T09:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: why i am finding count difference in timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295039#M89041</link>
      <description>&lt;P&gt;Please post the search, with any confidential information removed, so we can help you more accurately.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 13:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295039#M89041</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-12T13:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: why i am finding count difference in timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295040#M89042</link>
      <description>&lt;P&gt;i believe it is the way that timechart buckets the days. I believe buckets start from the earliest date in your time frame. &lt;/P&gt;

&lt;P&gt;If you search &lt;CODE&gt;|timechart span=7d count&lt;/CODE&gt; for Last 30 days (2017-09-12 through 2017-10-12), the _time comes back with 2017-09-12, 2017-09-19, 2017-09-26, 2017-10-03 and 2017-10-10&lt;BR /&gt;
however if you run the same search for Last 7 days (2017-10-05 through 2017-10-12), you'll get _time of 2017-10-05 and 2017-10-12&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 13:17:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295040#M89042</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-10-12T13:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: why i am finding count difference in timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295041#M89043</link>
      <description>&lt;P&gt;Hi daljeanis,&lt;/P&gt;

&lt;P&gt;This is my search,&lt;/P&gt;

&lt;P&gt;index=qranges|fillnull value=Null|search Name="*"|join type=left IP [search index=rranges |stats count by sas _time]|stats count by sas _time|bin span=1d _time|stats sum(count) by  sas&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 08:08:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295041#M89043</guid>
      <dc:creator>umsundar2015</dc:creator>
      <dc:date>2017-10-13T08:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: why i am finding count difference in timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295042#M89044</link>
      <description>&lt;P&gt;i am giving span=1d , Can you please help me out&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 08:09:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295042#M89044</guid>
      <dc:creator>umsundar2015</dc:creator>
      <dc:date>2017-10-13T08:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: why i am finding count difference in timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295043#M89045</link>
      <description>&lt;P&gt;Hi umsundar2015,&lt;BR /&gt;
you used a join using IP as key, but in your subsearch you haven't IP field as output, so your join never matches.&lt;BR /&gt;
Try to insert in your subsearch IP AS value or key stats.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 08:32:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295043#M89045</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-13T08:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: why i am finding count difference in timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295044#M89046</link>
      <description>&lt;P&gt;@Anonymous points out that IP is not in your subsearch, yet you have it set as the field to join to. Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| join type=left IP 
    [ search index=rranges 
    | stats count by IP sas _time] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;also, your whole query isn't by _time, so the total sum wouldn't match because you're summing by sas, not by day (_time span=1d). essentially, the bin command is not doing anything in the grand scheme. &lt;/P&gt;

&lt;P&gt;if you wanted it by day and sas, bin _time first, then apply the stats command. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|bin span=1d _time
|stats count by sas _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:14:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/why-i-am-finding-count-difference-in-timechart-function/m-p/295044#M89046</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2020-09-29T16:14:49Z</dc:date>
    </item>
  </channel>
</rss>

