<?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 How to create an average on the position for each value in events (ex: Dog = position 1 and 5, Average for Dog = 3)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151717#M42476</link>
    <description>&lt;P&gt;Hi Wonder if any of the community can help me.&lt;/P&gt;

&lt;P&gt;I'm trying to create an average of some data, and running into problems.&lt;/P&gt;

&lt;P&gt;My data looks like this&lt;/P&gt;

&lt;P&gt;Fieldname is Animals&lt;/P&gt;

&lt;P&gt;Event 1 - "Dog","Cat","Horse","Rabbit","Zebra" &lt;BR /&gt;
Event 2 - "Zebra","Horse","Cat","Rabbit","Dog"&lt;/P&gt;

&lt;P&gt;I'm trying to create an average for each element (i.e each animal) in the event, based on it's position.&lt;/P&gt;

&lt;P&gt;So - &lt;BR /&gt;
Dog = position 1 and 5&lt;BR /&gt;
Cat = position 2 and 3&lt;BR /&gt;
Horse = position 3 and 2&lt;BR /&gt;
etc&lt;/P&gt;

&lt;P&gt;what I want out the back of this, is a table that looks like the following&lt;/P&gt;

&lt;P&gt;Animal      Avg&lt;BR /&gt;
Dog             3&lt;BR /&gt;
Cat             2.5&lt;BR /&gt;
Horse        2.5&lt;BR /&gt;
Rabbit        4&lt;BR /&gt;
Zebra        2.5&lt;/P&gt;

&lt;P&gt;Many Thanks for any help.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Apr 2015 15:09:59 GMT</pubDate>
    <dc:creator>JovanMilosevic</dc:creator>
    <dc:date>2015-04-20T15:09:59Z</dc:date>
    <item>
      <title>How to create an average on the position for each value in events (ex: Dog = position 1 and 5, Average for Dog = 3)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151717#M42476</link>
      <description>&lt;P&gt;Hi Wonder if any of the community can help me.&lt;/P&gt;

&lt;P&gt;I'm trying to create an average of some data, and running into problems.&lt;/P&gt;

&lt;P&gt;My data looks like this&lt;/P&gt;

&lt;P&gt;Fieldname is Animals&lt;/P&gt;

&lt;P&gt;Event 1 - "Dog","Cat","Horse","Rabbit","Zebra" &lt;BR /&gt;
Event 2 - "Zebra","Horse","Cat","Rabbit","Dog"&lt;/P&gt;

&lt;P&gt;I'm trying to create an average for each element (i.e each animal) in the event, based on it's position.&lt;/P&gt;

&lt;P&gt;So - &lt;BR /&gt;
Dog = position 1 and 5&lt;BR /&gt;
Cat = position 2 and 3&lt;BR /&gt;
Horse = position 3 and 2&lt;BR /&gt;
etc&lt;/P&gt;

&lt;P&gt;what I want out the back of this, is a table that looks like the following&lt;/P&gt;

&lt;P&gt;Animal      Avg&lt;BR /&gt;
Dog             3&lt;BR /&gt;
Cat             2.5&lt;BR /&gt;
Horse        2.5&lt;BR /&gt;
Rabbit        4&lt;BR /&gt;
Zebra        2.5&lt;/P&gt;

&lt;P&gt;Many Thanks for any help.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 15:09:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151717#M42476</guid>
      <dc:creator>JovanMilosevic</dc:creator>
      <dc:date>2015-04-20T15:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an average on the position for each value in events (ex: Dog = position 1 and 5, Average for Dog = 3)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151718#M42477</link>
      <description>&lt;P&gt;index=win |head 2| eval animals="Dog,Dog,Dog,Cat,Horse,Rabbit,Zebra"|eval animals= split(animals,",") |eval eventno=1 |accum eventno  |mvexpand animals |streamstats count by eventno |stats avg(count) by animals&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 18:31:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151718#M42477</guid>
      <dc:creator>aalanisr26</dc:creator>
      <dc:date>2015-04-20T18:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an average on the position for each value in events (ex: Dog = position 1 and 5, Average for Dog = 3)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151719#M42478</link>
      <description>&lt;P&gt;the index=win|head 2| &lt;BR /&gt;
was just for testing purposes but I get the idea right?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 18:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151719#M42478</guid>
      <dc:creator>aalanisr26</dc:creator>
      <dc:date>2015-04-20T18:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create an average on the position for each value in events (ex: Dog = position 1 and 5, Average for Dog = 3)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151720#M42479</link>
      <description>&lt;P&gt;Thats got it! &lt;/P&gt;

&lt;P&gt;Thanks - Really appreciate that.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2015 20:56:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-an-average-on-the-position-for-each-value-in/m-p/151720#M42479</guid>
      <dc:creator>JovanMilosevic</dc:creator>
      <dc:date>2015-04-20T20:56:43Z</dc:date>
    </item>
  </channel>
</rss>

