<?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: Reverse Timechart Bucket Creation Order in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592915#M206365</link>
    <description>&lt;P&gt;Not sure if this is less painful, just simpler&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| addinfo
| eval offset=strftime(info_max_time, "%w")
| eval _time = _time + (6 - offset) * 86400
| timechart span=1w@w ``` or bin span=1w@w _time ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 14:07:22 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2022-04-07T14:07:22Z</dc:date>
    <item>
      <title>Is there a way to reverse the order of automatic start/end values used for bucket creation when working with timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592590#M206258</link>
      <description>&lt;P&gt;Does anyone know of a way to reverse the order of the automatic start/end values used for bucket creation when working with timechart (or other similar commands)? For example, if I have a timechart with a span of 7 days and a search window of 30 days, the 7-day-buckets start with the oldest data and move forward to the most recent results, resulting in the most recent bucket having a small sample-size; maybe only two days, or three days, rather than the full seven.&lt;/P&gt;
&lt;P&gt;It seems reasonable to me that most people would care about the more recent data and less about the oldest (incomplete) data and therefore would have an option to adjust this behavior and choose to start at now() and work backwards rather than earliest() and working forward.&lt;/P&gt;
&lt;P&gt;Am I missing something? Any tips or tricks? I asked support and was basically told this is by design with no real workaround. That doesn't seem right to me.&lt;/P&gt;
&lt;P&gt;Oh, and again, this is not necessarily limited to timechart, but that's where I run into this frustration the most and where I imagine it is the .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 15:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592590#M206258</guid>
      <dc:creator>bcwlk</dc:creator>
      <dc:date>2022-04-06T15:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse Timechart Bucket Creation Order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592611#M206269</link>
      <description>&lt;P&gt;You probably need to do your own bucketing e.g.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| addinfo
| eval daysago=floor((relative_time(info_max_time,"+1d@d")-_time)/(60*60*24))
| eval weeksago=floor(daysago/7)
| eval _time=relative_time(info_max_time,"+1d@d")-(weeksago*60*60*24*7)&lt;/LI-CODE&gt;&lt;P&gt;This buckets _time based on the end of the last day in the time period (which actually equates to the beginning of the next day) and then every seven days prior to that point.&lt;/P&gt;&lt;P&gt;You may still experience some oddities around how this is displayed with standard charts as _time is treated as a special case and even though the dates aren't Mondays, the X-axis may still be marked using the Monday as the date displayed. You can get around this by formatting _time as a different field and using that instead.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 08:31:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592611#M206269</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-06T08:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse Timechart Bucket Creation Order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592796#M206342</link>
      <description>&lt;P class="lia-align-left"&gt;Ouch. Thanks for the input. That's more or less the direction I started going but it's painful.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 01:04:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592796#M206342</guid>
      <dc:creator>bcwlk</dc:creator>
      <dc:date>2022-04-07T01:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse Timechart Bucket Creation Order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592915#M206365</link>
      <description>&lt;P&gt;Not sure if this is less painful, just simpler&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| addinfo
| eval offset=strftime(info_max_time, "%w")
| eval _time = _time + (6 - offset) * 86400
| timechart span=1w@w ``` or bin span=1w@w _time ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 14:07:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592915#M206365</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-04-07T14:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse Timechart Bucket Creation Order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592967#M206385</link>
      <description>&lt;P&gt;Similar but different, the additional ideas help. Thanks for the input, and yes that's simpler. I guess I should put in an ideas request to add a param/option to the bucket, or timechart, or anything with a span parameter to allow reversing the bucket chronology. I just really was hoping there was a lesser known command or trick to get this working without hacking _time.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 18:57:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592967#M206385</guid>
      <dc:creator>bcwlk</dc:creator>
      <dc:date>2022-04-07T18:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse Timechart Bucket Creation Order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592968#M206386</link>
      <description>&lt;P&gt;I will mark this as the (workaround) solution for now. If another trick/solution comes in with better direction I think I can update the solution later, but otherwise your answer is I think the most practical response.&lt;/P&gt;&lt;P&gt;Thanks to you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;also.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 18:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592968#M206386</guid>
      <dc:creator>bcwlk</dc:creator>
      <dc:date>2022-04-07T18:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse Timechart Bucket Creation Order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592978#M206390</link>
      <description>&lt;P&gt;Agreed. &amp;nbsp;When I first saw it, I was absolutely convinced that this could be achieved with manipulation of &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/SearchTimeModifiers#Specify_a_snap_to_time_unit" target="_blank" rel="noopener"&gt;snap-on options&lt;/A&gt;&amp;nbsp;but it didn't work out as I had hoped.&lt;/P&gt;&lt;P&gt;Meanwhile, if you are willing to force your users' hands - with dashboard selectors, for example, you could do something like "earliest=-3w@+1d". &amp;nbsp;For example, the following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_telemetry date_wday=* ``` emulation ```
 earliest=-3w@+1d
``` testing below ```
| eval date=strftime(_time, "%F")
| sort - _time
| bin span=1w _time 
| stats dc(date) list(date_wday) list(date) by _time
| sort - _time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;outputs&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;_time&lt;/TD&gt;&lt;TD&gt;dc(date)&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;list(date_wday)&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;list(date)&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-04-01&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;thursday&lt;/DIV&gt;&lt;DIV class=""&gt;wednesday&lt;/DIV&gt;&lt;DIV class=""&gt;tuesday&lt;/DIV&gt;&lt;DIV class=""&gt;monday&lt;/DIV&gt;&lt;DIV class=""&gt;sunday&lt;/DIV&gt;&lt;DIV class=""&gt;saturday&lt;/DIV&gt;&lt;DIV class=""&gt;friday&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;2022-04-07&lt;/DIV&gt;&lt;DIV class=""&gt;2022-04-06&lt;/DIV&gt;&lt;DIV class=""&gt;2022-04-05&lt;/DIV&gt;&lt;DIV class=""&gt;2022-04-04&lt;/DIV&gt;&lt;DIV class=""&gt;2022-04-03&lt;/DIV&gt;&lt;DIV class=""&gt;2022-04-02&lt;/DIV&gt;&lt;DIV class=""&gt;2022-04-01&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-03-25&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;thursday&lt;/DIV&gt;&lt;DIV class=""&gt;wednesday&lt;/DIV&gt;&lt;DIV class=""&gt;tuesday&lt;/DIV&gt;&lt;DIV class=""&gt;monday&lt;/DIV&gt;&lt;DIV class=""&gt;sunday&lt;/DIV&gt;&lt;DIV class=""&gt;saturday&lt;/DIV&gt;&lt;DIV class=""&gt;friday&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;2022-03-31&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-30&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-29&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-28&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-27&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-26&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-25&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-03-18&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;thursday&lt;/DIV&gt;&lt;DIV class=""&gt;wednesday&lt;/DIV&gt;&lt;DIV class=""&gt;tuesday&lt;/DIV&gt;&lt;DIV class=""&gt;monday&lt;/DIV&gt;&lt;DIV class=""&gt;sunday&lt;/DIV&gt;&lt;DIV class=""&gt;saturday&lt;/DIV&gt;&lt;DIV class=""&gt;friday&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;2022-03-24&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-23&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-22&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-21&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-20&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-19&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-18&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2022-03-11&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;thursday&lt;/DIV&gt;&lt;DIV class=""&gt;wednesday&lt;/DIV&gt;&lt;DIV class=""&gt;tuesday&lt;/DIV&gt;&lt;DIV class=""&gt;monday&lt;/DIV&gt;&lt;DIV class=""&gt;sunday&lt;/DIV&gt;&lt;DIV class=""&gt;saturday&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class=""&gt;2022-03-17&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-16&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-15&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-14&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-13&lt;/DIV&gt;&lt;DIV class=""&gt;2022-03-12&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Splunk also allows you do define custom time ranges so your users do not have to manually enter if they want to use such in search window and dashboard alike.)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 19:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/592978#M206390</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-04-07T19:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reverse Timechart Bucket Creation Order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/594161#M206797</link>
      <description>&lt;P&gt;I created an IDEAS post, if anyone is interested in voting on it. Hopefully my proposal is clear enough to get the idea across.&lt;/P&gt;&lt;P&gt;&lt;A href="https://ideas.splunk.com/ideas/EID-I-1424" target="_blank"&gt;Option to Reverse Chronological Order of Span Buckets | Ideas (splunk.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 00:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-reverse-the-order-of-automatic-start-end/m-p/594161#M206797</guid>
      <dc:creator>bcwlk</dc:creator>
      <dc:date>2022-04-19T00:32:34Z</dc:date>
    </item>
  </channel>
</rss>

