<?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: Subsearching within time frame in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526438#M148590</link>
    <description>&lt;P&gt;Yes! that what I was looking for! Thanks!&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;, another question, see the screenshot I've attached, say I want to have the results as another 2 columns (e.g pastVisits and pastFinishedVisits). Taking visits for example, 'pastVisits' would represent visit that have happened 30 to 15 days ago, and 'visits' represents visits that have happened15 days ago until current day. How do I do that?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-10-26 at 12.38.24.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11486i2F1F12FCD451CE02/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-10-26 at 12.38.24.png" alt="Screen Shot 2020-10-26 at 12.38.24.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Oct 2020 10:55:59 GMT</pubDate>
    <dc:creator>barakb</dc:creator>
    <dc:date>2020-10-26T10:55:59Z</dc:date>
    <item>
      <title>Subsearching within time frame</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526386#M148576</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm new to Splunk. I've got this search query:&lt;/P&gt;&lt;P&gt;host="..."&amp;nbsp;earliest=-30d latest=now | stats distinct_count(v_id) AS v_id count(eval(req_type="[POST])) AS req_type by host | eval ratio =v_id/req_type&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;What I want to get a table with v_id and req_type of the earlier week and of the current week (currently I get only for the whole month). Moreover, if there is a better, easier to do this, please also share. Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 22:55:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526386#M148576</guid>
      <dc:creator>barakb</dc:creator>
      <dc:date>2020-10-25T22:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearching within time frame</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526387#M148577</link>
      <description>&lt;LI-CODE lang="markup"&gt;host="..." earliest=-30d latest=now 
| bin span=7d _time
| stats distinct_count(v_id) AS v_id count(eval(req_type="[POST])) AS req_type by host _time
| eval ratio =v_id/req_type&lt;/LI-CODE&gt;&lt;P&gt;Setting the span to 7 days will bin from the earliest and given the 30 does not divide by 7 exactly, your latest bin will only contain counts for 2 days (which might not be what you want). Either change earliest to -28d@d or latest&amp;nbsp; to -2d@d&lt;/P&gt;</description>
      <pubDate>Sun, 25 Oct 2020 23:14:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526387#M148577</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-25T23:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearching within time frame</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526438#M148590</link>
      <description>&lt;P&gt;Yes! that what I was looking for! Thanks!&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;, another question, see the screenshot I've attached, say I want to have the results as another 2 columns (e.g pastVisits and pastFinishedVisits). Taking visits for example, 'pastVisits' would represent visit that have happened 30 to 15 days ago, and 'visits' represents visits that have happened15 days ago until current day. How do I do that?&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-10-26 at 12.38.24.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11486i2F1F12FCD451CE02/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-10-26 at 12.38.24.png" alt="Screen Shot 2020-10-26 at 12.38.24.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Oct 2020 10:55:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526438#M148590</guid>
      <dc:creator>barakb</dc:creator>
      <dc:date>2020-10-26T10:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Subsearching within time frame</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526439#M148591</link>
      <description>&lt;LI-CODE lang="markup"&gt;host="..." earliest=-30d latest=now 
| bin span=15d _time
| stats distinct_count(v_id) AS visits count(eval(req_type="[POST])) AS finishedVisits by host _time
| eval ratio=visits/finishedVisits
| autoregress visits AS pastVisits p=1
| autoregress finishedVisits AS pastFinishedVisits p=1
| autoregress host AS sameHost p=1
| where host=sameHost&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 26 Oct 2020 11:20:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Subsearching-within-time-frame/m-p/526439#M148591</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-26T11:20:44Z</dc:date>
    </item>
  </channel>
</rss>

