<?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 My weekly timespan shows bins that are more than week boundaries in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237025#M188598</link>
    <description>&lt;P&gt;I have set up an accelerated summary for a report with summary range of 1 month. I want to report summary by week. When I run a search with "timechart bins=4 span=1week...", I get 4 to 5 bins: one per week. But then I also get some other bins with days in addition to weekly bins in my search results. I don't want to get individual days that are outside the week boundaries. I never want to see data summarized by any granularity lower than a week. Do I need to change my acceleration setup or my timechart command in the search?&lt;/P&gt;

&lt;P&gt;Splunk doc says to let them figure out the correct timespan. But I feel that they are summarizing at too low of a granular level (10min, 1hr). Regardless, I want the timechart command to show correct results with proper weekly bins.&lt;/P&gt;

&lt;P&gt;What is wrong here?&lt;/P&gt;

&lt;P&gt;Here is how my summary detail looks:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
Details Learn more. &lt;BR /&gt;
Summarization Load  0.0000&lt;BR /&gt;
Access Count    0 Last Access: Never&lt;BR /&gt;
Size on Disk    7.83MB&lt;BR /&gt;
Summary Range   30 days&lt;BR /&gt;
Timespans   10min, 1d, 1h, 1mon&lt;BR /&gt;
Buckets 506&lt;BR /&gt;
Chunks  1002&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 03 Jul 2016 13:29:26 GMT</pubDate>
    <dc:creator>tambepc</dc:creator>
    <dc:date>2016-07-03T13:29:26Z</dc:date>
    <item>
      <title>My weekly timespan shows bins that are more than week boundaries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237025#M188598</link>
      <description>&lt;P&gt;I have set up an accelerated summary for a report with summary range of 1 month. I want to report summary by week. When I run a search with "timechart bins=4 span=1week...", I get 4 to 5 bins: one per week. But then I also get some other bins with days in addition to weekly bins in my search results. I don't want to get individual days that are outside the week boundaries. I never want to see data summarized by any granularity lower than a week. Do I need to change my acceleration setup or my timechart command in the search?&lt;/P&gt;

&lt;P&gt;Splunk doc says to let them figure out the correct timespan. But I feel that they are summarizing at too low of a granular level (10min, 1hr). Regardless, I want the timechart command to show correct results with proper weekly bins.&lt;/P&gt;

&lt;P&gt;What is wrong here?&lt;/P&gt;

&lt;P&gt;Here is how my summary detail looks:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
Details Learn more. &lt;BR /&gt;
Summarization Load  0.0000&lt;BR /&gt;
Access Count    0 Last Access: Never&lt;BR /&gt;
Size on Disk    7.83MB&lt;BR /&gt;
Summary Range   30 days&lt;BR /&gt;
Timespans   10min, 1d, 1h, 1mon&lt;BR /&gt;
Buckets 506&lt;BR /&gt;
Chunks  1002&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jul 2016 13:29:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237025#M188598</guid>
      <dc:creator>tambepc</dc:creator>
      <dc:date>2016-07-03T13:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: My weekly timespan shows bins that are more than week boundaries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237026#M188599</link>
      <description>&lt;P&gt;Do post the entire search you're running, over what time range, and what results you're getting in the statistics tab.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jul 2016 13:55:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237026#M188599</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-07-03T13:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: My weekly timespan shows bins that are more than week boundaries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237027#M188600</link>
      <description>&lt;P&gt;Do the &lt;CODE&gt;bucketing&lt;/CODE&gt; yourself, like this, just before your &lt;CODE&gt;timechart&lt;/CODE&gt; command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... |  eval _time = case((tonumber(strftime(_time, "%d")) &amp;lt;= 7),  "1",
                         (tonumber(strftime(_time, "%d")) &amp;lt;= 14), "2",
                         (tonumber(strftime(_time, "%d")) &amp;lt;= 21), "3",
                         (tonumber(strftime(_time, "%d")) &amp;lt;= 28), "4",
                                                          true(), "5")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jul 2016 14:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237027#M188600</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-04T14:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: My weekly timespan shows bins that are more than week boundaries</title>
      <link>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237028#M188601</link>
      <description>&lt;P&gt;Thank you @woodcock. This worked. I further modified it as follows to snap _time to the beginning of the week (Sunday):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval _time = strftime(relative_time(_time, "-0w@w"),"%Y-%m-%d")
| stats count as events by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Although, I am somewhat disappointed that timechart is not working as expected with its "span" and "bins" options. Anyway, thank you very much for your help!!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 15:10:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/My-weekly-timespan-shows-bins-that-are-more-than-week-boundaries/m-p/237028#M188601</guid>
      <dc:creator>tambepc</dc:creator>
      <dc:date>2016-07-06T15:10:40Z</dc:date>
    </item>
  </channel>
</rss>

