<?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: Calculate avg , min , max for per multivalue field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47360#M11302</link>
    <description>&lt;P&gt;Hi Yutennis,&lt;/P&gt;

&lt;P&gt;Putting your data into a lookup &lt;STRONG&gt;tennis.csv&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;customer,type,amount
A, a, 10
A, a, 20
A, b, 10
B, a, 5
B, a, 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I used the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup tennis.csv | stats count, max(amount), min(amount), avg(amount) by customer, type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which gave me this:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/Screen_Shot_2013-08-27_at_4.34.56_PM.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Hope this of some help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2013 06:37:41 GMT</pubDate>
    <dc:creator>rturk</dc:creator>
    <dc:date>2013-08-27T06:37:41Z</dc:date>
    <item>
      <title>Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47355#M11297</link>
      <description>&lt;P&gt;Hi !&lt;/P&gt;

&lt;P&gt;I would like to ask question whether following calculation is possible or not?&lt;BR /&gt;
For following case,&lt;/P&gt;

&lt;P&gt;customer  type   amount&lt;BR /&gt;
A         a      10&lt;BR /&gt;
A         a      20&lt;BR /&gt;
A         b      10&lt;BR /&gt;
B         a      5&lt;BR /&gt;
B         a      10&lt;/P&gt;

&lt;P&gt;I want to calculate fields as &lt;/P&gt;

&lt;P&gt;customer type  count min  max avg &lt;BR /&gt;
A        a     2     10   20  15&lt;BR /&gt;
         b     1     10   10  10&lt;BR /&gt;
B        a     2     5    10  7.5&lt;/P&gt;

&lt;P&gt;However, I have tried that &lt;/P&gt;

&lt;P&gt;stats values(type) , count, min(amount), max(amount), avg(amount) by customer&lt;/P&gt;

&lt;P&gt;does not work...&lt;/P&gt;

&lt;P&gt;I would appreciate if someone can help me out with this issue.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Yu&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 05:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47355#M11297</guid>
      <dc:creator>yuwtennis</dc:creator>
      <dc:date>2013-08-27T05:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47356#M11298</link>
      <description>&lt;P&gt;The result is useless or in the following?Please let me know if there is something objective.&lt;/P&gt;

&lt;P&gt;stats count, min(amount), max(amount), avg(amount) by customer,type&lt;BR /&gt;
customer type count min max avg&lt;BR /&gt;
 A a 2 10 20 15&lt;BR /&gt;
 A b 1 10 10 10&lt;BR /&gt;
 B a 2 5 10 7.5&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 05:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47356#M11298</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2013-08-27T05:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47357#M11299</link>
      <description>&lt;P&gt;Hello Hiroshi.&lt;/P&gt;

&lt;P&gt;My goal is to calculate the stats (max, min , avg) by type per customer.&lt;BR /&gt;
I believe just simply specifying "by" statement in stats groups by &lt;BR /&gt;
type regardless of customer.&lt;/P&gt;

&lt;P&gt;So if something like ,&lt;/P&gt;

&lt;P&gt;stats ( count by type ) by customer &lt;/P&gt;

&lt;P&gt;can happen, I can achieve my goal.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 05:48:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47357#M11299</guid>
      <dc:creator>yuwtennis</dc:creator>
      <dc:date>2013-08-27T05:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47358#M11300</link>
      <description>&lt;P&gt;customer 別 に type の値を計算したいのですが、&lt;BR /&gt;
どうもうまくいかないみたいで。。。もし、&lt;BR /&gt;
解決方法をご教示いただけると幸いです。&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 05:51:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47358#M11300</guid>
      <dc:creator>yuwtennis</dc:creator>
      <dc:date>2013-08-27T05:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47359#M11301</link>
      <description>&lt;P&gt;Hi. yuwtennis.I also love tennis.  &lt;/P&gt;

&lt;P&gt;もう少しバリエーションをふやして結果のイメージを提供してもらえませんか？&lt;/P&gt;

&lt;P&gt;Could you provide an image of the result by increasing the variation a little more?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 06:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47359#M11301</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2013-08-27T06:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47360#M11302</link>
      <description>&lt;P&gt;Hi Yutennis,&lt;/P&gt;

&lt;P&gt;Putting your data into a lookup &lt;STRONG&gt;tennis.csv&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;customer,type,amount
A, a, 10
A, a, 20
A, b, 10
B, a, 5
B, a, 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I used the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup tennis.csv | stats count, max(amount), min(amount), avg(amount) by customer, type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Which gave me this:&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://splunk-base.splunk.com//storage/Screen_Shot_2013-08-27_at_4.34.56_PM.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Hope this of some help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 06:37:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47360#M11302</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2013-08-27T06:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47361#M11303</link>
      <description>&lt;P&gt;Sorry I didn't see Hiroshi's earlier answer - please accept his answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2013 06:43:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47361#M11303</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2013-08-27T06:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47362#M11304</link>
      <description>&lt;P&gt;Hello Hiroshi.&lt;/P&gt;

&lt;P&gt;回答ありがとうございます。&lt;/P&gt;

&lt;P&gt;以下のような結果を出したいです。&lt;/P&gt;

&lt;P&gt;ex1：&lt;BR /&gt;
customer  type   amount&lt;BR /&gt;
A         a      10&lt;BR /&gt;
A         a      10&lt;BR /&gt;
A         a      10&lt;BR /&gt;
A         b      10&lt;BR /&gt;
B         b      20&lt;BR /&gt;
B         c      10&lt;BR /&gt;
C         a      10&lt;/P&gt;

&lt;P&gt;res1：&lt;BR /&gt;
customer  type   avg min max&lt;BR /&gt;
A         a      10  10  10&lt;BR /&gt;
          b      10  10  10&lt;BR /&gt;
B         b      20  20  20&lt;BR /&gt;
          c      10  10  10&lt;BR /&gt;
C         a      10  10  10&lt;/P&gt;

&lt;P&gt;以上です。&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 03:38:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47362#M11304</guid>
      <dc:creator>yuwtennis</dc:creator>
      <dc:date>2013-08-28T03:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47363#M11305</link>
      <description>&lt;P&gt;Hello R.Turk.&lt;/P&gt;

&lt;P&gt;Thank you for the reply.&lt;BR /&gt;
I was not aware that you can specify multiple fields in stats!&lt;/P&gt;

&lt;P&gt;The result came out the way I wanted .&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
Yu&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 03:41:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47363#M11305</guid>
      <dc:creator>yuwtennis</dc:creator>
      <dc:date>2013-08-28T03:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47364#M11306</link>
      <description>&lt;P&gt;これはもう解決したと思ってよいか？&lt;BR /&gt;
Is it may be considered to have resolved this anymore?&lt;/P&gt;

&lt;P&gt;サンプルに近いフォーマットならこんな感じになると思う。&lt;BR /&gt;
I think to be a feeling that if format close to the sample.&lt;/P&gt;

&lt;P&gt;･･･ | stats count as count, min(amount) as min, max(amount) as max, avg(amount) as avg by customer,type|stats list(type) as type,list(count) as count,list(min) as min,list(max) as max,list(avg) as avg by customer&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 04:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47364#M11306</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2013-08-28T04:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate avg , min , max for per multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47365#M11307</link>
      <description>&lt;P&gt;No problems Yu - Please accept Hiroshi's answer so other people can find the solution.&lt;/P&gt;

&lt;P&gt;いいえ問題は - 他の人が解決策を見つけることができるように Hiroshi's の答えを受け入れてくださいませ&lt;/P&gt;

&lt;P&gt;(Thanks Google translate!)&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 14:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-avg-min-max-for-per-multivalue-field/m-p/47365#M11307</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2013-08-28T14:20:28Z</dc:date>
    </item>
  </channel>
</rss>

