<?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: Why does addcoltotals not display decimal totals? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392950#M114313</link>
    <description>&lt;P&gt;hi @andrewtrobec&lt;/P&gt;

&lt;P&gt;try like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
 | eval decimal = 1.5
 | eval whole = 1.5
 | append [ | makeresults
 | eval decimal = 1
 | eval whole = 1.5]
 |eval decimal=round(decimal,2)  |eval whole=round(whole,2) |addcoltotals
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 26 Sep 2018 12:55:28 GMT</pubDate>
    <dc:creator>harishalipaka</dc:creator>
    <dc:date>2018-09-26T12:55:28Z</dc:date>
    <item>
      <title>Why does addcoltotals not display decimal totals?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392948#M114311</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I've noticed that the &lt;CODE&gt;addcoltotals&lt;/CODE&gt; command doesn't display decimals if the total contains a decimal.  Run anywhere code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval decimal = 1.5
| eval whole = 1.5
| append [ | makeresults
| eval decimal = 1
| eval whole = 1.5]
| addcoltotals
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm using Splunk 6.4.1 and my results are:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;decimal,whole
1.5,1.5
1,1.5
2,3.0 (here it truncates to a single decimal place for the decimal field)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is there something I'm missing?&lt;BR /&gt;
Regards,&lt;BR /&gt;
Andrew&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 12:32:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392948#M114311</guid>
      <dc:creator>andrewtrobec</dc:creator>
      <dc:date>2018-09-26T12:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why does addcoltotals not display decimal totals?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392949#M114312</link>
      <description>&lt;P&gt;It looks like &lt;CODE&gt;addcoltotals&lt;/CODE&gt; is using the lowest level of precision of the values it's adding.  Since '1' has zero digits of precision, that's what is used for the result.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 12:43:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392949#M114312</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-09-26T12:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why does addcoltotals not display decimal totals?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392950#M114313</link>
      <description>&lt;P&gt;hi @andrewtrobec&lt;/P&gt;

&lt;P&gt;try like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
 | eval decimal = 1.5
 | eval whole = 1.5
 | append [ | makeresults
 | eval decimal = 1
 | eval whole = 1.5]
 |eval decimal=round(decimal,2)  |eval whole=round(whole,2) |addcoltotals
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Sep 2018 12:55:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392950#M114313</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-09-26T12:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Why does addcoltotals not display decimal totals?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392951#M114314</link>
      <description>&lt;P&gt;Hi @andrewtrobec &lt;BR /&gt;
Did you get that.&lt;BR /&gt;
If my answer helped you please accept answer or up vote&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 16:54:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392951#M114314</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-09-26T16:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does addcoltotals not display decimal totals?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392952#M114315</link>
      <description>&lt;P&gt;This is a good workaround, thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 17:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-addcoltotals-not-display-decimal-totals/m-p/392952#M114315</guid>
      <dc:creator>andrewtrobec</dc:creator>
      <dc:date>2018-09-26T17:03:17Z</dc:date>
    </item>
  </channel>
</rss>

