<?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 How to create a stat table that has columns that represent the same time range per week. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172647#M49492</link>
    <description>&lt;P&gt;I have this basic query and would like to create a stat table that shows the result for the last 3 weeks for the same datetime range.&lt;/P&gt;

&lt;P&gt;ourcetype=iis  tag=webserver cs_uri_stem="/SearchQuery*" |stats avg(TimeTakenMS)  by cs_uri_stem&lt;/P&gt;

&lt;P&gt;Thanks in advance! &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:44:47 GMT</pubDate>
    <dc:creator>DandeGuzman</dc:creator>
    <dc:date>2020-09-28T19:44:47Z</dc:date>
    <item>
      <title>How to create a stat table that has columns that represent the same time range per week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172647#M49492</link>
      <description>&lt;P&gt;I have this basic query and would like to create a stat table that shows the result for the last 3 weeks for the same datetime range.&lt;/P&gt;

&lt;P&gt;ourcetype=iis  tag=webserver cs_uri_stem="/SearchQuery*" |stats avg(TimeTakenMS)  by cs_uri_stem&lt;/P&gt;

&lt;P&gt;Thanks in advance! &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:44:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172647#M49492</guid>
      <dc:creator>DandeGuzman</dc:creator>
      <dc:date>2020-09-28T19:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a stat table that has columns that represent the same time range per week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172648#M49493</link>
      <description>&lt;P&gt;Can you please share the expected output?&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 07:13:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172648#M49493</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-05-06T07:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a stat table that has columns that represent the same time range per week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172649#M49494</link>
      <description>&lt;P&gt;Hello! Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    sourcetype=iis tag=webserver cs_uri_stem="/SearchQuery*" earliest=-3w@w latest=now |bucket span=7d _time|stats avg(TimeTakenMS) by cs_uri_stem, _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 May 2015 10:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172649#M49494</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-06T10:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a stat table that has columns that represent the same time range per week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172650#M49495</link>
      <description>&lt;P&gt;Hi Stephane I am actually aiming for a result that will look something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cs_uri_stem           Week1   Week2   Week3
/SearchQuery1          123     122     110
/SearchQUery2          43       54     49
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am trying to tweak what you have given though it should be near enough. &lt;/P&gt;

&lt;P&gt;Thank you so much.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 23:45:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172650#M49495</guid>
      <dc:creator>DandeGuzman</dc:creator>
      <dc:date>2015-05-06T23:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a stat table that has columns that represent the same time range per week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172651#M49496</link>
      <description>&lt;P&gt;Hi I am trying to get this output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cs_uri_stem           Week1   Week2   Week3
/SearchQuery1          123     122     110
/SearchQUery2          43       54     49
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where week columns are derived from the same daytime value per week.&lt;/P&gt;

&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 23:52:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172651#M49496</guid>
      <dc:creator>DandeGuzman</dc:creator>
      <dc:date>2015-05-06T23:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a stat table that has columns that represent the same time range per week.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172652#M49497</link>
      <description>&lt;P&gt;Here is what i can do for you. Instead of &lt;STRONG&gt;Week1, Week2, ...&lt;/STRONG&gt;   in your table, you can say, &lt;STRONG&gt;week of  10/April&lt;/STRONG&gt;, &lt;STRONG&gt;week of 18/April&lt;/STRONG&gt;......&lt;/P&gt;

&lt;P&gt;Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  sourcetype=iis tag=webserver cs_uri_stem="/SearchQuery*" earliest=-3w@w latest=now |bucket span=7d _time| eval day_week=strftime(_time, "%d/%b")|replace * with "week of *" in day_week|stats avg(TimeTakenMS) by cs_uri_stem, day_week
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 May 2015 07:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-stat-table-that-has-columns-that-represent-the/m-p/172652#M49497</guid>
      <dc:creator>stephanefotso</dc:creator>
      <dc:date>2015-05-07T07:30:02Z</dc:date>
    </item>
  </channel>
</rss>

