<?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: How can I get one avg count per day? with time span = 3h I get 3 counts per day.Just need to identify one avg user c in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611244#M212533</link>
    <description>I think that you should 1st select events which are within your business day definition and after that calculate those values with bin 1d.&lt;BR /&gt;r. Ismo</description>
    <pubDate>Tue, 30 Aug 2022 07:18:00 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2022-08-30T07:18:00Z</dc:date>
    <item>
      <title>How can I get just one avg count per day? (With time span = 3h I get 3 counts per day)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611192#M212515</link>
      <description>&lt;P&gt;Using the below query to get the daily avg user in during biz hours:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;index=pan_logs sourcetype=json_no_timestamp metricname="field total user"&lt;BR /&gt;|bin _time span=3h | stats latest(metricvalue) AS temp_count by metricname _time&lt;BR /&gt;| stats sum(temp_count) as "Users" by _time&lt;BR /&gt;|eval Date=strftime(_time,"%m/%d/%y")&lt;BR /&gt;|eval bustime=_time, bustime=strftime(bustime, "%H")&lt;BR /&gt;|eval day_of_week = strftime(_time,"%A")&lt;BR /&gt;|where ( bustime &amp;gt; 8 and bustime &amp;lt; 18) AND NOT (day_of_week="Saturday" OR day_of_week="Sunday")&lt;BR /&gt;|eventstats avg(Users) as DailyAvgUsers by Date&lt;BR /&gt;|eval DailyAvgUsers = round(DailyAvgUsers)&lt;BR /&gt;|table Date day_of_week DailyAvgUsers&lt;/P&gt;
&lt;P&gt;but the query gives 3 counts per day&amp;nbsp; while i want only 1 for a day, when i change span to 6h , it gives me one count , but since i am counting only between 8AM to 6PM , it gives me no count when i run the search at 12PM Monday with 6h span.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="imsidrai_0-1661792522881.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21243iA9F06A63A86F0348/image-size/medium?v=v2&amp;amp;px=400" role="button" title="imsidrai_0-1661792522881.png" alt="imsidrai_0-1661792522881.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="imsidrai_1-1661792581430.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21244iC3DC15CE1B4B753E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="imsidrai_1-1661792581430.png" alt="imsidrai_1-1661792581430.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How I can get one avg count per day? with time span = 3h&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 15:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611192#M212515</guid>
      <dc:creator>imsidrai</dc:creator>
      <dc:date>2022-09-02T15:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get one avg count per day? with time span = 3h I get 3 counts per day.Just need to identify one avg user c</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611244#M212533</link>
      <description>I think that you should 1st select events which are within your business day definition and after that calculate those values with bin 1d.&lt;BR /&gt;r. Ismo</description>
      <pubDate>Tue, 30 Aug 2022 07:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611244#M212533</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-08-30T07:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get one avg count per day? with time span = 3h I get 3 counts per day.Just need to identify one avg user c</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611265#M212540</link>
      <description>&lt;P&gt;But if i run this with 1d span , the report only shows data for last day , it wont show the data for current day until the span is completed.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 09:56:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611265#M212540</guid>
      <dc:creator>imsidrai</dc:creator>
      <dc:date>2022-08-30T09:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get one avg count per day? with time span = 3h I get 3 counts per day.Just need to identify one avg user c</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611281#M212544</link>
      <description>&lt;P&gt;Some clarification about time entities on Splunk:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Time period - Time period from where you are looking events&lt;/LI&gt;&lt;LI&gt;Time bin/span - slots inside Time period to where you are dividing the whole time period.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I understood that you have longer time period than 1d and you want to divide it to 1d bins? If this is correct then just look when day is Monday to Friday and hour eg. 8 to 17 or what ever those should be. After that you have just those correct events and then you can slot it to 1d bins (which contains events on business days with business hours).&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 11:14:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611281#M212544</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-08-30T11:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I get one avg count per day? with time span = 3h I get 3 counts per day.Just need to identify one avg user c</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611784#M212694</link>
      <description>&lt;P&gt;thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 15:21:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-get-just-one-avg-count-per-day-With-time-span-3h-I-get/m-p/611784#M212694</guid>
      <dc:creator>imsidrai</dc:creator>
      <dc:date>2022-09-02T15:21:07Z</dc:date>
    </item>
  </channel>
</rss>

