<?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 do you use the stats command on a timechart output? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437859#M7917</link>
    <description>&lt;P&gt;Where do you get that &lt;CODE&gt;by Date&lt;/CODE&gt; from? That &lt;CODE&gt;Date&lt;/CODE&gt; field doesn't exist (at least not given the exact query you are showing here).&lt;/P&gt;

&lt;P&gt;If you want to get the max per-second-count by day, try it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...base_query
| timechart span=1s count(field_1) as c by field_2
| bin _time span=1d
| stats max(c) by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 17 Dec 2018 10:24:18 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-12-17T10:24:18Z</dc:date>
    <item>
      <title>How do you use the stats command on a timechart output?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437858#M7916</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;i wanted to calculate a count for every 1 sec period and then find the max of the count per day.&lt;/P&gt;

&lt;P&gt;i have calculated the count using timechart function.Using query below:&lt;/P&gt;

&lt;P&gt;1)..base_query|timechart span=1s count(field_1) as c by field_2&lt;/P&gt;

&lt;P&gt;The output of the above query gives a count every 1 second.&lt;/P&gt;

&lt;P&gt;Now to calculate the max of count per day. i tried using stats:&lt;/P&gt;

&lt;P&gt;2)..base_query|timechart span=1s count(field_1) as c by field_2|stats max(c) by Date&lt;/P&gt;

&lt;P&gt;But, the 2nd query does not give desired output.&lt;/P&gt;

&lt;P&gt;Thanks in Advance!!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 22:24:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437858#M7916</guid>
      <dc:creator>asharm65</dc:creator>
      <dc:date>2020-09-29T22:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use the stats command on a timechart output?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437859#M7917</link>
      <description>&lt;P&gt;Where do you get that &lt;CODE&gt;by Date&lt;/CODE&gt; from? That &lt;CODE&gt;Date&lt;/CODE&gt; field doesn't exist (at least not given the exact query you are showing here).&lt;/P&gt;

&lt;P&gt;If you want to get the max per-second-count by day, try it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...base_query
| timechart span=1s count(field_1) as c by field_2
| bin _time span=1d
| stats max(c) by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Dec 2018 10:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437859#M7917</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-12-17T10:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use the stats command on a timechart output?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437860#M7918</link>
      <description>&lt;P&gt;This does not give any output&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 11:48:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437860#M7918</guid>
      <dc:creator>asharm65</dc:creator>
      <dc:date>2018-12-19T11:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do you use the stats command on a timechart output?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437861#M7919</link>
      <description>&lt;P&gt;Can you share the actual search you are running which doesn't give output and / or a screenshot of the situation?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2018 12:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-you-use-the-stats-command-on-a-timechart-output/m-p/437861#M7919</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-12-19T12:02:04Z</dc:date>
    </item>
  </channel>
</rss>

