<?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: When multiplying 3 fields to get a new field, why does Splunk round the result when the fields are decimals? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/When-multiplying-3-fields-to-get-a-new-field-why-does-Splunk/m-p/306081#M91889</link>
    <description>&lt;P&gt;Thanks so much!! &lt;/P&gt;

&lt;P&gt;It's working perfectly. Now, it's returning the exact hoped result.&lt;/P&gt;</description>
    <pubDate>Mon, 22 May 2017 13:28:12 GMT</pubDate>
    <dc:creator>nsanchezfernand</dc:creator>
    <dc:date>2017-05-22T13:28:12Z</dc:date>
    <item>
      <title>When multiplying 3 fields to get a new field, why does Splunk round the result when the fields are decimals?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-multiplying-3-fields-to-get-a-new-field-why-does-Splunk/m-p/306079#M91887</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;I have one issue with my search. I need to multiply three fields to get another new field. When I do the multiply, in some cases it works right, but with some values it rounds the result... &lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;I need to multiply next fields: &lt;CODE&gt;cw \* tcw \* aw&lt;/CODE&gt; and put the result in the field called wt. There's no problem when these fields are integers, in this case Splunk multiplies them well, but when these fields are decimal, Splunk rounds the result, and I don't know why.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2976i85533E898698B596/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The part of the search that does this is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| convert num(cw) as cw, num(tcw) as tcw, num(aw) as aw
| eval wt=cw \* tcw \* aw
| stats values(wt)  values(cw) values(tcw) values(aw) by Month, cou, techclu, app, appid, act, ow, aid, acty, afm ,camp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anyone knows what can be happening?? I've tried all, and it returns me the same result again and again.&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 08:59:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-multiplying-3-fields-to-get-a-new-field-why-does-Splunk/m-p/306079#M91887</guid>
      <dc:creator>nsanchezfernand</dc:creator>
      <dc:date>2017-05-22T08:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: When multiplying 3 fields to get a new field, why does Splunk round the result when the fields are decimals?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-multiplying-3-fields-to-get-a-new-field-why-does-Splunk/m-p/306080#M91888</link>
      <description>&lt;P&gt;Splunk normally performs integer arithmetic unless you specify otherwise.  Try the &lt;CODE&gt;exact&lt;/CODE&gt; operator.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| convert num(cw) as cw, num(tcw) as tcw, num(aw) as aw
| eval wt=exact(cw * tcw * aw)
| stats values(wt)  values(cw) values(tcw) values(aw) by Month, cou, techclu, app, appid, act, ow, aid, acty, afm ,camp
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 May 2017 13:19:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-multiplying-3-fields-to-get-a-new-field-why-does-Splunk/m-p/306080#M91888</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-05-22T13:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: When multiplying 3 fields to get a new field, why does Splunk round the result when the fields are decimals?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/When-multiplying-3-fields-to-get-a-new-field-why-does-Splunk/m-p/306081#M91889</link>
      <description>&lt;P&gt;Thanks so much!! &lt;/P&gt;

&lt;P&gt;It's working perfectly. Now, it's returning the exact hoped result.&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2017 13:28:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/When-multiplying-3-fields-to-get-a-new-field-why-does-Splunk/m-p/306081#M91889</guid>
      <dc:creator>nsanchezfernand</dc:creator>
      <dc:date>2017-05-22T13:28:12Z</dc:date>
    </item>
  </channel>
</rss>

