<?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 typical week base on month data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517385#M145484</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to chart typical week of our web application users based on data from last 4 weeks. Idea is, roughly explained, that I would calculate sum of request group (login, user accounts, etc - already done) per day and then created some type of "7 day window" in which there would be (seen in a graph) only 7 days but each day would be average of that day from last month.&lt;/P&gt;&lt;P&gt;So in a graph there would be (for example in case of request_group='login'):&lt;/P&gt;&lt;P&gt;Monday - 10 - which si average of sum in all mondays (10, 10, 5, 15, 10)&lt;BR /&gt;Tuesday - 8 - which is avg of sum in all tuesdays (8, 10, 6, 8, &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;...and so on up until Sunday&lt;/P&gt;&lt;P&gt;part of my search is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;host "server" sourcetype="access_combined"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;... some eval stuff ...&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| fields _time request_group&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;... here should by magic calculating data ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance. I've already tried different approach using streamstats or timewrap, but nothing worked as I intended.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 06:25:49 GMT</pubDate>
    <dc:creator>JakubJ</dc:creator>
    <dc:date>2020-09-02T06:25:49Z</dc:date>
    <item>
      <title>typical week base on month data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517385#M145484</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to chart typical week of our web application users based on data from last 4 weeks. Idea is, roughly explained, that I would calculate sum of request group (login, user accounts, etc - already done) per day and then created some type of "7 day window" in which there would be (seen in a graph) only 7 days but each day would be average of that day from last month.&lt;/P&gt;&lt;P&gt;So in a graph there would be (for example in case of request_group='login'):&lt;/P&gt;&lt;P&gt;Monday - 10 - which si average of sum in all mondays (10, 10, 5, 15, 10)&lt;BR /&gt;Tuesday - 8 - which is avg of sum in all tuesdays (8, 10, 6, 8, &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;...and so on up until Sunday&lt;/P&gt;&lt;P&gt;part of my search is:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;host "server" sourcetype="access_combined"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;... some eval stuff ...&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;| fields _time request_group&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;... here should by magic calculating data ...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance. I've already tried different approach using streamstats or timewrap, but nothing worked as I intended.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 06:25:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517385#M145484</guid>
      <dc:creator>JakubJ</dc:creator>
      <dc:date>2020-09-02T06:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: typical week base on month data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517394#M145489</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=_internal sourcetype=splunkd_access
| bin _time span=1d
| stats count by date_wday,_time
| stats avg(count) as average by date_wday&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Sep 2020 06:42:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517394#M145489</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-09-02T06:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: typical week base on month data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517409#M145494</link>
      <description>&lt;P&gt;please like my answer if it solves your problem.:)&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 07:14:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517409#M145494</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-09-02T07:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: typical week base on month data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517413#M145495</link>
      <description>&lt;P&gt;thank you for your hint. I was able to include this into my search, so last part in my case looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host "server" sourcetype="access_combined"
... some eval stuff ...
| fields date_wday _time request_group
| search request_group!="other"
| bin _time span=1d
| stats count by date_wday,request_group,_time
| chart avg(count) as prumer by date_wday,request_group
| eval sort_field = case(date_wday=="monday", 1,
    date_wday=="tuesday", 2,
    date_wday=="wednesday", 3,
    date_wday=="thursday", 4,
    date_wday=="friday", 5,
    date_wday=="saturday", 6,
    date_wday=="sunday", 7)
| sort 0 sort_field&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorting is based (coppied &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; ) from &lt;A href="https://community.splunk.com/t5/Splunk-Search/Days-in-Alphabetical-Order-but-need-to-be-in-day-order-Tried/td-p/150403" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/Days-in-Alphabetical-Order-but-need-to-be-in-day-order-Tried/td-p/150403&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 07:38:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/typical-week-base-on-month-data/m-p/517413#M145495</guid>
      <dc:creator>JakubJ</dc:creator>
      <dc:date>2020-09-02T07:38:01Z</dc:date>
    </item>
  </channel>
</rss>

