<?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: Avg disappears if I add min and max in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517580#M145553</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;if you get min and max, but avg is empty it usually means that your field is not numeric. Can you &amp;nbsp;check it and convert to numeric if needed?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 20:41:53 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2020-09-02T20:41:53Z</dc:date>
    <item>
      <title>Avg disappears if I add min and max, so how do I combine avg, min, and max together to have all the stats I need?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517548#M145543</link>
      <description>&lt;P&gt;I have events with response_time fields coming from an access log file. I have to display the average, min, and max response times sorted by another field called repository. My search looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt;
| stats min(response_time) as min max(response_time) as max avg(response_time) as avg by repository&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The average column is empty while I have min and max calculated correctly.&lt;/P&gt;
&lt;P&gt;Now, if I remove min and max from my stats command average is calculated as expected.&lt;BR /&gt;The response_time field is numeric.&lt;/P&gt;
&lt;P&gt;How do I combine avg, min, and max together to have all the stats that I need?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 22:33:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517548#M145543</guid>
      <dc:creator>pszabo75</dc:creator>
      <dc:date>2020-09-02T22:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517550#M145545</link>
      <description>&lt;P&gt;Does putting commas between or using different names help?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;base_search&amp;gt;
| stats min(response_time) as minimum, max(response_time) as maximum, avg(response_time) as average by repository&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Sep 2020 16:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517550#M145545</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-02T16:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517557#M145548</link>
      <description>&lt;P&gt;No, that doesn't help. In fact, that was my initial version and I removed the commas because I saw examples without them here in the forum.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 18:23:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517557#M145548</guid>
      <dc:creator>pszabo75</dc:creator>
      <dc:date>2020-09-02T18:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517568#M145551</link>
      <description>&lt;P&gt;Can you change renamed values, try to use minimum instead of min, maximum instead of max, average instead of avg.&lt;/P&gt;&lt;P&gt;min, max and avg are function keywords may be that could be reason.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 19:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517568#M145551</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-09-02T19:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517578#M145552</link>
      <description>&lt;P&gt;My original stats command looked like this and it didn't work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats min(response_time) as min_response_time, max(response_time) as max_response_time, avg(response_time) as avg_response_time by repository&lt;/LI-CODE&gt;&lt;P&gt;However I tested it once again, and confirmed that it doesn't help.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 20:11:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517578#M145552</guid>
      <dc:creator>pszabo75</dc:creator>
      <dc:date>2020-09-02T20:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517580#M145553</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;if you get min and max, but avg is empty it usually means that your field is not numeric. Can you &amp;nbsp;check it and convert to numeric if needed?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 20:41:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517580#M145553</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-02T20:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517592#M145558</link>
      <description>&lt;P&gt;Did you mean something like this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval resp_time=tonumber(response_time)
| stats min(resp_time) as minimum, max(resp_time) as maximum, avg(resp_time) as average by repository&lt;/LI-CODE&gt;&lt;P&gt;With this search I don't have any results, not even the min and max values.&lt;BR /&gt;And don't forget that avg is only empty if I add min and max to the search. Without min and max I have average. I also examined the events and I can see this if I select the response_time field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 878px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10617iBAA4C1423F31FDDD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&amp;nbsp;I think response_time is definitely number.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 21:15:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517592#M145558</guid>
      <dc:creator>pszabo75</dc:creator>
      <dc:date>2020-09-02T21:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517597#M145560</link>
      <description>&lt;P&gt;What happens if you just try min and avg or max and avg (i.e. not all 3)?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 22:26:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517597#M145560</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-02T22:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517639#M145575</link>
      <description>FYI: Interesting Fields 1st character&lt;BR /&gt;a -&amp;gt; String&lt;BR /&gt;# -&amp;gt; Number&lt;BR /&gt;That is the easiest way to check the type of field.</description>
      <pubDate>Thu, 03 Sep 2020 05:50:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517639#M145575</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-03T05:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517640#M145576</link>
      <description>&lt;P&gt;Maybe it's time for support case to splunk?&lt;/P&gt;&lt;P&gt;btw. which version you are running and which OS?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 06:02:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517640#M145576</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-03T06:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517643#M145578</link>
      <description>Actually you could use commas or not, both are working. Many times commas make it more readable, but those are not mandatory. Same is also valid quite many other places (table, foreach ...) too.</description>
      <pubDate>Thu, 03 Sep 2020 06:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517643#M145578</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-03T06:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517743#M145604</link>
      <description>&lt;P&gt;I should have mentioned that I already tried it too.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 15:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517743#M145604</guid>
      <dc:creator>pszabo75</dc:creator>
      <dc:date>2020-09-03T15:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517744#M145605</link>
      <description>&lt;P&gt;It's Splunk 8.0.1.&lt;BR /&gt;I don't know the OS but most likely our firm's RHEL 7 based internal Linux build&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 15:15:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517744#M145605</guid>
      <dc:creator>pszabo75</dc:creator>
      <dc:date>2020-09-03T15:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517949#M145676</link>
      <description>&lt;P&gt;Can you post the whole query as the issue is probably somewhere else than this stats?&lt;/P&gt;&lt;P&gt;And is the avg only function which is not working or is the same also e.g. for median, p90 etc.?&lt;/P&gt;&lt;P&gt;And no mater if you change the order of those?&lt;/P&gt;&lt;P&gt;Anything on job inspector?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 17:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/517949#M145676</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-04T17:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/518480#M145802</link>
      <description>&lt;P&gt;This is the whole query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="log-39337-prod-c" laas_appId="gitscm.stash*-bitbucket-access" status=200 username!=" - " labels!=" - "
| fields labels, response_time, action, laas_appId 
| rex field=laas_appId "gitscm.(?&amp;lt;instance&amp;gt;(.*))-bitbucket-access" 
| rex field=labels ".+(?&amp;lt;operation&amp;gt;refs|fetch|push|clone|archive)" 
| search operation=clone 
| rex field=action ".+\/scm\/(?&amp;lt;repository&amp;gt;.+)\.git.+" 
| stats min(response_time) as minimum, max(response_time) as maximum, avg(response_time) as average by repository&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 08 Sep 2020 16:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/518480#M145802</guid>
      <dc:creator>pszabo75</dc:creator>
      <dc:date>2020-09-08T16:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/518738#M145963</link>
      <description>Really weird, at least I couldn’t notice anything which breaks that query.&lt;BR /&gt;Probably next step is to create ticket to splunk support.</description>
      <pubDate>Wed, 09 Sep 2020 16:49:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/518738#M145963</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-09T16:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Avg disappears if I add min and max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/518747#M145973</link>
      <description>&lt;P&gt;Yeah, everyone seems to run out of ideas so I guess I don't have any other option.&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 18:20:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Avg-disappears-if-I-add-min-and-max-so-how-do-I-combine-avg-min/m-p/518747#M145973</guid>
      <dc:creator>pszabo75</dc:creator>
      <dc:date>2020-09-09T18:20:01Z</dc:date>
    </item>
  </channel>
</rss>

