<?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: average for a field value per n number of events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467149#M131471</link>
    <description>&lt;P&gt;this works thanks man&lt;/P&gt;</description>
    <pubDate>Tue, 07 Apr 2020 09:10:06 GMT</pubDate>
    <dc:creator>zubairaizatron</dc:creator>
    <dc:date>2020-04-07T09:10:06Z</dc:date>
    <item>
      <title>average for a field value per n number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467144#M131466</link>
      <description>&lt;P&gt;How would i find the average value of a certain field per a certain amount of events&lt;/P&gt;

&lt;P&gt;Example:&lt;BR /&gt;
i have 1000 events and in there i have a specific numerical field. what would i do if i wanted an average of every 10 events and wanted to display them in a new table. so my new table will have 100 events now each entry filled with the average of 10 events&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 13:34:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467144#M131466</guid>
      <dc:creator>zubairaizatron</dc:creator>
      <dc:date>2020-04-06T13:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: average for a field value per n number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467145#M131467</link>
      <description>&lt;P&gt;Try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = INDEXNAME | streamstats count | eval count = count - 1, count = count - (count % 10) | stats avg(NUMERIC_FIELD) by count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Apr 2020 14:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467145#M131467</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-04-06T14:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: average for a field value per n number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467146#M131468</link>
      <description>&lt;P&gt;This run-anywhere example may help.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval fielda = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40" 
| eval fielda=split(fielda,",") 
| mvexpand fielda 
`comment("Everything above just creates sample data")`
| streamstats reset_after=(count==10) window=10 avg(fielda) count | where count=10 | fields - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Apr 2020 14:44:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467146#M131468</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-06T14:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: average for a field value per n number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467147#M131469</link>
      <description>&lt;P&gt;this generates a weird count value. its goes 0,10,100,1000,10000,10010,10020,10030, whereas what we looking for is a 10,20,30,40,50 in the count&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 15:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467147#M131469</guid>
      <dc:creator>zubairaizatron</dc:creator>
      <dc:date>2020-04-06T15:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: average for a field value per n number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467148#M131470</link>
      <description>&lt;P&gt;Just sort count, you'll see expected values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = INDEXNAME | streamstats count | eval count = count - 1, count = count - (count % 10) | stats avg(NUMERIC_FIELD) by count | sort count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Apr 2020 18:29:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467148#M131470</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-04-06T18:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: average for a field value per n number of events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467149#M131471</link>
      <description>&lt;P&gt;this works thanks man&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2020 09:10:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/average-for-a-field-value-per-n-number-of-events/m-p/467149#M131471</guid>
      <dc:creator>zubairaizatron</dc:creator>
      <dc:date>2020-04-07T09:10:06Z</dc:date>
    </item>
  </channel>
</rss>

