<?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: Adding up numerical values within a multi-value field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17260#M2412</link>
    <description>&lt;P&gt;No it is not. The search language is intended for handling multiple events. Multivalued fields should not be overused. The way to add up values is really the have them properly normalized out in separate events/results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=x | stats list(x) as xlist, first(_serial) as _serial by y 
| eval eventuniquekey=_serial 
| mvexpand _serial 
| eventstats sum(xlist) as xsum by _serial,y 
| mvcombine xsum 
| fields - eventuniquekey,xlist
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this, &lt;CODE&gt;y&lt;/CODE&gt; doesn't matter, it's just a placeholder for other potential split-by fields.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jul 2010 10:38:10 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2010-07-13T10:38:10Z</dc:date>
    <item>
      <title>Adding up numerical values within a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17259#M2411</link>
      <description>&lt;P&gt;In search language, is there a way to add the values stored in a multi-value field provided they are all numerical values?&lt;/P&gt;

&lt;P&gt;I assume this might be possible with a rather excessive use of the eval functions, but I haven't been able to come up with something satisfactory.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2010 07:52:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17259#M2411</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2010-07-13T07:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding up numerical values within a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17260#M2412</link>
      <description>&lt;P&gt;No it is not. The search language is intended for handling multiple events. Multivalued fields should not be overused. The way to add up values is really the have them properly normalized out in separate events/results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=x | stats list(x) as xlist, first(_serial) as _serial by y 
| eval eventuniquekey=_serial 
| mvexpand _serial 
| eventstats sum(xlist) as xsum by _serial,y 
| mvcombine xsum 
| fields - eventuniquekey,xlist
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this, &lt;CODE&gt;y&lt;/CODE&gt; doesn't matter, it's just a placeholder for other potential split-by fields.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2010 10:38:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17260#M2412</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-07-13T10:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Adding up numerical values within a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17261#M2413</link>
      <description>&lt;P&gt;Thanks Gerald, your answer confirms what I thought.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2010 01:14:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17261#M2413</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2010-07-14T01:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding up numerical values within a multi-value field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17262#M2414</link>
      <description>&lt;P&gt;It's not hard to write your own custom search command that provides this functionality (or anything else you might want to do with multi-valued fields).  Sometimes that just really comes in handy.  Here's one I wrote: &lt;A href="http://jordan.broughs.net/archives/2012/06/mvsum-for-splunk-summing-multi-valued-fields-within-a-single-event"&gt;http://jordan.broughs.net/archives/2012/06/mvsum-for-splunk-summing-multi-valued-fields-within-a-single-event&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jun 2012 15:22:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-up-numerical-values-within-a-multi-value-field/m-p/17262#M2414</guid>
      <dc:creator>Jordan_Brough</dc:creator>
      <dc:date>2012-06-29T15:22:01Z</dc:date>
    </item>
  </channel>
</rss>

