<?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 Timechart results, max value for time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396221#M115029</link>
    <description>&lt;P&gt;Hi all, &lt;/P&gt;

&lt;P&gt;I am counting distinct values of destinations with timechart (span=1h). &lt;BR /&gt;
I am trying to take those values and find the max value per hour, as follows: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Original: 
_time    dest1       dest2           dest3
06:00      3           0               1
07:00      6           2               9 
08:00      0           3               7
 ...

Result: 
_time    max 
06:00     3                 
07:00     9                
08:00     7            
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*This is just an example, there are more dests and more hours. &lt;/P&gt;

&lt;P&gt;Can anyone please assist me with this ? &lt;/P&gt;

&lt;P&gt;Thanks! &lt;/P&gt;</description>
    <pubDate>Sun, 14 Jul 2019 06:52:55 GMT</pubDate>
    <dc:creator>astatrial</dc:creator>
    <dc:date>2019-07-14T06:52:55Z</dc:date>
    <item>
      <title>Timechart results, max value for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396221#M115029</link>
      <description>&lt;P&gt;Hi all, &lt;/P&gt;

&lt;P&gt;I am counting distinct values of destinations with timechart (span=1h). &lt;BR /&gt;
I am trying to take those values and find the max value per hour, as follows: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Original: 
_time    dest1       dest2           dest3
06:00      3           0               1
07:00      6           2               9 
08:00      0           3               7
 ...

Result: 
_time    max 
06:00     3                 
07:00     9                
08:00     7            
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*This is just an example, there are more dests and more hours. &lt;/P&gt;

&lt;P&gt;Can anyone please assist me with this ? &lt;/P&gt;

&lt;P&gt;Thanks! &lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 06:52:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396221#M115029</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-07-14T06:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart results, max value for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396222#M115030</link>
      <description>&lt;P&gt;@astatrial ,&lt;/P&gt;

&lt;P&gt;Try adding this to end of your search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval max=0
|foreach * [eval max=if(max &amp;lt; &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;,max)]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR below if you do not want destination fields in your output&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|untable _time,dest,count
|stats max(count) as c by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Jul 2019 08:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396222#M115030</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-07-14T08:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart results, max value for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396223#M115031</link>
      <description>&lt;P&gt;First option didn't work, but the second option worked. &lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 10:33:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396223#M115031</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-07-14T10:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart results, max value for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396224#M115032</link>
      <description>&lt;P&gt;@astatrial ,&lt;BR /&gt;
First option also should work. Did you get any error message? Please note that , you have to use that search as it is. i.e. &lt;CODE&gt;&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;&lt;/CODE&gt; should be there as it is , dont replace it with your field names&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jul 2019 10:47:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396224#M115032</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-07-14T10:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart results, max value for time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396225#M115033</link>
      <description>&lt;P&gt;Yes, i know. There was no error, i know it is possible to fix it to get the result but the second option did the job. &lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 06:04:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-results-max-value-for-time/m-p/396225#M115033</guid>
      <dc:creator>astatrial</dc:creator>
      <dc:date>2019-07-15T06:04:29Z</dc:date>
    </item>
  </channel>
</rss>

