<?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: Comma separated number in sum function going negative in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169020#M48254</link>
    <description>&lt;P&gt;I actually figured out that my problem was the length of the _raw field itself.  Occasionally the data I'm pulling in has valid event-per-line events that exceed 10,000 characters, so I had to turn truncate off in the sourcetypes and it stopped chopping off my data in random places.  Splunk has a default limit here of 10,000 characters.  Unfortunately I lost some data in the process of learning this that can't be regenerated but I'll catch it for future iterations.  &lt;/P&gt;

&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
    <pubDate>Mon, 04 Aug 2014 19:59:21 GMT</pubDate>
    <dc:creator>mjones414</dc:creator>
    <dc:date>2014-08-04T19:59:21Z</dc:date>
    <item>
      <title>Comma separated number in sum function going negative</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169017#M48251</link>
      <description>&lt;P&gt;in the following situation:&lt;BR /&gt;
... | stats sum(SumofCoreSecs) as total | eval Total = tostring(total, "commas") | table Total&lt;/P&gt;

&lt;P&gt;This works fine up until a certain length of a number, but I recently ran across a sum value that went negative: &lt;/P&gt;

&lt;P&gt;-9,302,873,272,376&lt;/P&gt;

&lt;P&gt;I know that there are no negative numbers in the raw data. Is this a condition of the sum function?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 12:52:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169017#M48251</guid>
      <dc:creator>mjones414</dc:creator>
      <dc:date>2014-08-04T12:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Comma separated number in sum function going negative</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169018#M48252</link>
      <description>&lt;P&gt;Does the field SumofCoreSecs have commas?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 14:18:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169018#M48252</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2014-08-04T14:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Comma separated number in sum function going negative</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169019#M48253</link>
      <description>&lt;P&gt;Assuming that your SumofCoreSecs doesn't contain commas, i tested the sum function with much bigger values and it worked just fine.&lt;/P&gt;

&lt;P&gt;In case if your SumofCoreSecs contain commas then use convert function to remove commas. See this link &lt;A href="http://"&gt;http://answers.splunk.com/answers/36792/how-to-sum-numbers-with-commas&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 15:21:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169019#M48253</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-08-04T15:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Comma separated number in sum function going negative</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169020#M48254</link>
      <description>&lt;P&gt;I actually figured out that my problem was the length of the _raw field itself.  Occasionally the data I'm pulling in has valid event-per-line events that exceed 10,000 characters, so I had to turn truncate off in the sourcetypes and it stopped chopping off my data in random places.  Splunk has a default limit here of 10,000 characters.  Unfortunately I lost some data in the process of learning this that can't be regenerated but I'll catch it for future iterations.  &lt;/P&gt;

&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2014 19:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comma-separated-number-in-sum-function-going-negative/m-p/169020#M48254</guid>
      <dc:creator>mjones414</dc:creator>
      <dc:date>2014-08-04T19:59:21Z</dc:date>
    </item>
  </channel>
</rss>

