<?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: day of the week - average in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142912#M39701</link>
    <description>&lt;P&gt;Based on the assumption in my latest comment you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | bin span=1d _time | stats count dc(_time) as days by date_wday | eval average_count = count / days
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Apr 2014 12:57:46 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-04-29T12:57:46Z</dc:date>
    <item>
      <title>day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142904#M39693</link>
      <description>&lt;P&gt;Hello &lt;/P&gt;

&lt;P&gt;I would like to get the average of a measure depending on the day of the week (monday, tuesday,...) and this for a dedicated period.&lt;/P&gt;

&lt;P&gt;I am able to retrieve the day of the week corresponding to an event (date_wday) , but I am not able to know the number of Mondays , Tuesdays,.... in the period  (e.g month) and thus the results I get are not relevant.&lt;/P&gt;

&lt;P&gt;Does anyone have an idea ?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Loys &lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2014 09:47:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142904#M39693</guid>
      <dc:creator>loyslegrand</dc:creator>
      <dc:date>2014-04-25T09:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142905#M39694</link>
      <description>&lt;P&gt;What's wrong with this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | stats avg(measure) by date_wday
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Apr 2014 10:35:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142905#M39694</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-25T10:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142906#M39695</link>
      <description>&lt;P&gt;That should do the trick!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2014 21:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142906#M39695</guid>
      <dc:creator>bsizemore</dc:creator>
      <dc:date>2014-04-25T21:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142907#M39696</link>
      <description>&lt;P&gt;Note that the &lt;CODE&gt;date_*&lt;/CODE&gt; are only available for events where the timestamp processor has been invoked, which is not the case with for instance WinEventLog:* events.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Apr 2014 11:34:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142907#M39696</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2014-04-26T11:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142908#M39697</link>
      <description>&lt;P&gt;Thanks for your answer , but I'm still not able to get the right result&lt;/P&gt;

&lt;P&gt;When I enter :&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;base search | stats count by date_wday&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;(with date range = "May 2012")&lt;/P&gt;

&lt;P&gt;I have :&lt;/P&gt;

&lt;P&gt;friday : 13772&lt;/P&gt;

&lt;P&gt;monday : 17780&lt;/P&gt;

&lt;P&gt;saturday : 16389&lt;/P&gt;

&lt;P&gt;sunday : 20548&lt;/P&gt;

&lt;P&gt;thursday : 18187&lt;/P&gt;

&lt;P&gt;tuesday : 15488&lt;/P&gt;

&lt;P&gt;wednesday :21458&lt;/P&gt;

&lt;P&gt;When I enter :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search  | stats avg(count) by date_wday
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have 0 for all the days of the week&lt;/P&gt;

&lt;P&gt;BRgds&lt;/P&gt;

&lt;P&gt;Loys&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 09:08:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142908#M39697</guid>
      <dc:creator>loyslegrand</dc:creator>
      <dc:date>2014-04-29T09:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142909#M39698</link>
      <description>&lt;P&gt;Do your events have a numeric field called &lt;CODE&gt;count&lt;/CODE&gt;? If not then computing its average would be pointless.&lt;/P&gt;

&lt;P&gt;Your first search counts the number of events without looking at any fields or their average.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 09:31:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142909#M39698</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-29T09:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142910#M39699</link>
      <description>&lt;P&gt;I can enter also &lt;CODE&gt;| stats count(Incident) by date_wday&lt;/CODE&gt; which gives  me the same result as I need the number of events and if I enter : &lt;CODE&gt;| stats avg(count(Incident) by date_wday&lt;/CODE&gt;, I have still a null result for each day.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 12:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142910#M39699</guid>
      <dc:creator>loyslegrand</dc:creator>
      <dc:date>2014-04-29T12:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142911#M39700</link>
      <description>&lt;P&gt;What should the result of &lt;CODE&gt;avg(count(Incident))&lt;/CODE&gt; be for each week day? The average daily count, so if run over four weeks then a quarter of the total count?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 12:55:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142911#M39700</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-29T12:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142912#M39701</link>
      <description>&lt;P&gt;Based on the assumption in my latest comment you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | bin span=1d _time | stats count dc(_time) as days by date_wday | eval average_count = count / days
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Apr 2014 12:57:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142912#M39701</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-29T12:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142913#M39702</link>
      <description>&lt;P&gt;in May 2012 from which my data are from, there are 4 mondays for 17780 incidents =&amp;gt; an average of 17780/4 = 4445 incidents on Mondays, and 5 Tuesdays for 15488 =&amp;gt; an average of 15488/5 = 3097 incidents on Tuesdays&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 13:48:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142913#M39702</guid>
      <dc:creator>loyslegrand</dc:creator>
      <dc:date>2014-04-29T13:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142914#M39703</link>
      <description>&lt;P&gt;Great Job - It works - Thanks a lot &lt;/P&gt;

&lt;P&gt;Loys&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2014 16:27:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142914#M39703</guid>
      <dc:creator>loyslegrand</dc:creator>
      <dc:date>2014-04-29T16:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: day of the week - average</title>
      <link>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142915#M39704</link>
      <description>&lt;P&gt;Hi loyslegrand,&lt;/P&gt;

&lt;P&gt;My issue is that I have created a successful search for 1 category but need to know how to count for different category over week days and show them on one chart.&lt;/P&gt;

&lt;P&gt;base search category=* | bin span=1d _time | stats count dc(_time) as days by date_wday | eval average_count = count / days&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:03:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/day-of-the-week-average/m-p/142915#M39704</guid>
      <dc:creator>deepanram211219</dc:creator>
      <dc:date>2020-09-29T09:03:43Z</dc:date>
    </item>
  </channel>
</rss>

