<?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: timechart span 1w - gives different results compared to timechart span=1w count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-span-1w-gives-different-results-compared-to-timechart/m-p/267686#M80520</link>
    <description>&lt;P&gt;When you run the report using parameters&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... earliest=-1w@w latest=@w
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk will snap precisely to the beginning and end of a calendar week (The start of Sunday through the end of Saturday night) and will show you the data from that entire (and precise) week.  No more, no less.  For my example I was running (not important what it was exactly), I get exactly 5089 events in that time span.&lt;/P&gt;

&lt;P&gt;When you search by leaving off the earliest and latest, but with an added timechart and span: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart span=1w count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk will snap to whatever your time selector has as the start then splitt the time since then into 1 week periods.  So, if I run my example on a Thursday over the "last 7 days" time frame with that &lt;CODE&gt;span=1w&lt;/CODE&gt; timechart, I get TWO lines.  The first output line spans the 7 days previous to the current day's start which is from 7 days ago through last night at midnight.  The second line showing the data for today.  Neither of these are 5089, both are less.  If you click on an item in the _time column, it's little pop-up header will tell you the exact time frame it covers.&lt;/P&gt;

&lt;P&gt;Now, you can have both.  If you set earliest in your base search, then set your timechart and snap, you can get matching numbers.  In that case...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... earliest=-1w@w latest=@w | timechart span=1w count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Gives just the one week, a count of 5089.&lt;/P&gt;

&lt;P&gt;Likewise, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... earliest=-1w@w | timechart span=1w count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Would give two lines, the first output line being for essentially &lt;CODE&gt;-1w@w&lt;/CODE&gt; to &lt;CODE&gt;@w&lt;/CODE&gt; (which matches my original exactly - 5089 events) and a second line for this week so far.&lt;/P&gt;

&lt;P&gt;So, really your issue is probably just the interaction between those few places timeframes can be set and your snap to periods.  Hopefully this is enough to get you started.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2016 03:37:10 GMT</pubDate>
    <dc:creator>Richfez</dc:creator>
    <dc:date>2016-02-05T03:37:10Z</dc:date>
    <item>
      <title>timechart span 1w - gives different results compared to timechart span=1w count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-span-1w-gives-different-results-compared-to-timechart/m-p/267684#M80518</link>
      <description>&lt;P&gt;Hello I have a simple query where the first report is built using&lt;/P&gt;

&lt;P&gt;report 1:&lt;/P&gt;

&lt;P&gt;earliest=-1w@w1 latest=w1&lt;/P&gt;

&lt;P&gt;now on report 2&lt;/P&gt;

&lt;P&gt;I am just referencing this report 1 via: savedsearch and grabbing 4 weeks of data back and splitting it into 1 week chunks - now the issue is I am getting a mismatch in the total for the latest week:&lt;/P&gt;

&lt;P&gt;report 2:&lt;/P&gt;

&lt;P&gt;|savedsearch report 1&lt;BR /&gt;
| timechart span=1w count&lt;/P&gt;

&lt;P&gt;In report 2 - I get a smaller set of numbers compared to report 1 for that same 1 week.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 18:06:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-span-1w-gives-different-results-compared-to-timechart/m-p/267684#M80518</guid>
      <dc:creator>TCK101</dc:creator>
      <dc:date>2016-02-04T18:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: timechart span 1w - gives different results compared to timechart span=1w count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-span-1w-gives-different-results-compared-to-timechart/m-p/267685#M80519</link>
      <description>&lt;P&gt;Shouldn't the timerange for report1 be  &lt;CODE&gt;earliest=-1w@w1 latest=@w1&lt;/CODE&gt;  ??&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2016 19:22:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-span-1w-gives-different-results-compared-to-timechart/m-p/267685#M80519</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-02-04T19:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: timechart span 1w - gives different results compared to timechart span=1w count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-span-1w-gives-different-results-compared-to-timechart/m-p/267686#M80520</link>
      <description>&lt;P&gt;When you run the report using parameters&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... earliest=-1w@w latest=@w
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk will snap precisely to the beginning and end of a calendar week (The start of Sunday through the end of Saturday night) and will show you the data from that entire (and precise) week.  No more, no less.  For my example I was running (not important what it was exactly), I get exactly 5089 events in that time span.&lt;/P&gt;

&lt;P&gt;When you search by leaving off the earliest and latest, but with an added timechart and span: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart span=1w count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk will snap to whatever your time selector has as the start then splitt the time since then into 1 week periods.  So, if I run my example on a Thursday over the "last 7 days" time frame with that &lt;CODE&gt;span=1w&lt;/CODE&gt; timechart, I get TWO lines.  The first output line spans the 7 days previous to the current day's start which is from 7 days ago through last night at midnight.  The second line showing the data for today.  Neither of these are 5089, both are less.  If you click on an item in the _time column, it's little pop-up header will tell you the exact time frame it covers.&lt;/P&gt;

&lt;P&gt;Now, you can have both.  If you set earliest in your base search, then set your timechart and snap, you can get matching numbers.  In that case...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... earliest=-1w@w latest=@w | timechart span=1w count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Gives just the one week, a count of 5089.&lt;/P&gt;

&lt;P&gt;Likewise, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... earliest=-1w@w | timechart span=1w count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Would give two lines, the first output line being for essentially &lt;CODE&gt;-1w@w&lt;/CODE&gt; to &lt;CODE&gt;@w&lt;/CODE&gt; (which matches my original exactly - 5089 events) and a second line for this week so far.&lt;/P&gt;

&lt;P&gt;So, really your issue is probably just the interaction between those few places timeframes can be set and your snap to periods.  Hopefully this is enough to get you started.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 03:37:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-span-1w-gives-different-results-compared-to-timechart/m-p/267686#M80520</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-02-05T03:37:10Z</dc:date>
    </item>
  </channel>
</rss>

