<?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: Calculating Precentage of Int but get exception in thread error in tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Calculating-Precentage-of-Int-but-get-exception-in-thread-error/m-p/2363037#M127036</link>
    <description>&lt;P&gt;Also the calculation seems only to work when the integer value is 100 ie. a number without a decimal place&lt;/P&gt;</description>
    <pubDate>Mon, 11 Dec 2017 12:52:59 GMT</pubDate>
    <dc:creator>mobmsc2</dc:creator>
    <dc:date>2017-12-11T12:52:59Z</dc:date>
    <item>
      <title>Calculating Precentage of Int but get exception in thread error in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculating-Precentage-of-Int-but-get-exception-in-thread-error/m-p/2363036#M127035</link>
      <description>&lt;P&gt;In my tMap I have an input flow with an integer value and I need to calculate a set percentage of it for output flow.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(row1.Integer_Numeric/100*45) &lt;/PRE&gt;
&lt;P&gt;Is the calculation I have in the expression builder of a float variable but no matter what value I have for row1.Integer_Numeric I get 0 in the output flow without any compiler errors when I run the job.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I use the test feature in expression builder I get&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Exception in thread "main" java.lang.Error: Unresolved compilation problems&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do I need to cast the result of the calculation to a float within the expression builder or use a different datatype in the output flow?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 12:41:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculating-Precentage-of-Int-but-get-exception-in-thread-error/m-p/2363036#M127035</guid>
      <dc:creator>mobmsc2</dc:creator>
      <dc:date>2017-12-11T12:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Precentage of Int but get exception in thread error in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculating-Precentage-of-Int-but-get-exception-in-thread-error/m-p/2363037#M127036</link>
      <description>&lt;P&gt;Also the calculation seems only to work when the integer value is 100 ie. a number without a decimal place&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2017 12:52:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculating-Precentage-of-Int-but-get-exception-in-thread-error/m-p/2363037#M127036</guid>
      <dc:creator>mobmsc2</dc:creator>
      <dc:date>2017-12-11T12:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Precentage of Int but get exception in thread error in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Calculating-Precentage-of-Int-but-get-exception-in-thread-error/m-p/2363038#M127037</link>
      <description>&lt;P&gt;It seems I needed to convert the integer to a float value first using&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;row1.Integer_Numeric.floatValue()&lt;/PRE&gt;
&lt;P&gt;so that the calculation would work. I incorrectly assumed just the result needed to be a float when the input value was integer&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 09:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Calculating-Precentage-of-Int-but-get-exception-in-thread-error/m-p/2363038#M127037</guid>
      <dc:creator>mobmsc2</dc:creator>
      <dc:date>2017-12-12T09:48:06Z</dc:date>
    </item>
  </channel>
</rss>

