<?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 Why am I unable to convert my addcoltotals value of MB to TB using eval? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-convert-my-addcoltotals-value-of-MB-to-TB/m-p/210101#M61452</link>
    <description>&lt;P&gt;Hello Splunk Ninjas&lt;/P&gt;

&lt;P&gt;I'm trying to convert my addcoltotals of MB to TB using the eval statement which does not work....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex sourcetype=mysourcetype | table Cluster, Capacity_MB | addcoltotals  label=TOTALS labelfield=Cluster | eval  TOTALS = round(TOTALS/1024,2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2016 15:26:43 GMT</pubDate>
    <dc:creator>dean1</dc:creator>
    <dc:date>2016-06-14T15:26:43Z</dc:date>
    <item>
      <title>Why am I unable to convert my addcoltotals value of MB to TB using eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-convert-my-addcoltotals-value-of-MB-to-TB/m-p/210101#M61452</link>
      <description>&lt;P&gt;Hello Splunk Ninjas&lt;/P&gt;

&lt;P&gt;I'm trying to convert my addcoltotals of MB to TB using the eval statement which does not work....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex sourcetype=mysourcetype | table Cluster, Capacity_MB | addcoltotals  label=TOTALS labelfield=Cluster | eval  TOTALS = round(TOTALS/1024,2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 15:26:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-convert-my-addcoltotals-value-of-MB-to-TB/m-p/210101#M61452</guid>
      <dc:creator>dean1</dc:creator>
      <dc:date>2016-06-14T15:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to convert my addcoltotals value of MB to TB using eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-convert-my-addcoltotals-value-of-MB-to-TB/m-p/210102#M61453</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Your labelfield=Cluster means that's the name of the field that it's going to store the string "TOTALS".&lt;BR /&gt;
TOTALS is not a field, it's a value. The field is Capacity_MB.&lt;/P&gt;

&lt;P&gt;Therefore if you just want to apply it to that particular row in your table you can do it this way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval Capacity_MB = if(Cluster == "TOTALS", round(Capacity_MB/1024,2), Capacity_MB)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope that makes sense.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 15:40:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-convert-my-addcoltotals-value-of-MB-to-TB/m-p/210102#M61453</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-06-14T15:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to convert my addcoltotals value of MB to TB using eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-convert-my-addcoltotals-value-of-MB-to-TB/m-p/210103#M61454</link>
      <description>&lt;P&gt;Excellent - That worked - Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 19:36:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-unable-to-convert-my-addcoltotals-value-of-MB-to-TB/m-p/210103#M61454</guid>
      <dc:creator>dean1</dc:creator>
      <dc:date>2016-06-14T19:36:38Z</dc:date>
    </item>
  </channel>
</rss>

