<?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: After calc on Double String and 32 bit Integer + String TYPE recs gives a -0,00. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1514341#M36914</link>
    <description>&lt;P&gt;Qlik Sense.&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;P&gt;Input file has a field ([.AMOUNT]) that is forced to MONEY and saved as WBS_AMOUNT_SE:&lt;/P&gt;&lt;P&gt;CODE: MONEY ([.Amount]) as WBS_AMOUNT_SE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WBS_AMOUNT_SE Record 1: 111,40&lt;/P&gt;&lt;P&gt;WBS_AMOUNT_SE Record 1: 132,71&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use software called Q-EYE that looks at the qvd file.&lt;/P&gt;&lt;P&gt;In Q-EYE:&lt;/P&gt;&lt;P&gt;WBS_AMOUNTS_SE Record 1: 111,40 shows TYPE of DOUBLE+STRING&lt;/P&gt;&lt;P&gt;WBS_AMOUNTS_SE Record 1: 132,71 shows TYPE of DOUBLE+STRING&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then WBS_AMOUNT_SE is multiplied by 1000 and saved as AMOUNT_1K&lt;/P&gt;&lt;P&gt;CODE: Load *, money(WBS_AMOUNT_SE * (1000)) as AMOUNT_1K&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ISSUE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But then &lt;U&gt;after&lt;/U&gt; I do the calc (WBS_AMOUNT_SE * 1000) and store as AMOUNT_1K it gives different result TYPES:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AMOUNT_1K (111.400,00) has a TYPE of 32 BIT Integer + STRING&lt;/P&gt;&lt;P&gt;AMOUNT_1K (132.710,00) has a TYPE of DOUBLE + STRING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: the numbers visibly look correct in Q-Eye and Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When I do a calc on AMOUNT_1K - SUMSAP, for one I get 0,00 and the other one get -0,00.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The record that had TYPE DOUBLE+STRING after it was multiplied by 1000 gives a -0,00.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The other one that started with TYPE DOUBLE+STRING and changed to 32 BIT Integer + STRING TYPE gives a correct result of -0,00.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CODE: Load *, money((AMOUNT_1K) – (SUMSAP)) as CHECK1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AMOUNT_1K (111.400,00) – SUMSAP (111.400,00) = 0,00&lt;/P&gt;&lt;P&gt;AMOUNT_1K (132.710,00) – SUMSAP (132.710,00) = -0,00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also try to force if CHECK1 is (-0,00) to change it to CHECK (0,00) but still gives (-0,00):&lt;/P&gt;&lt;P&gt;CODE: Load *, IF (CHECK1 = ‘-0,00’, ‘0,00’, CHECK1) as CHECK&lt;/P&gt;</description>
    <pubDate>Thu, 29 Nov 2018 15:03:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-11-29T15:03:38Z</dc:date>
    <item>
      <title>After calc on Double String and 32 bit Integer + String TYPE recs gives a -0,00.</title>
      <link>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1513734#M36912</link>
      <description>&lt;P&gt;I am doing a calc on a field that has some records with a TYPE of DOUBLE + STRING and some of TYPE 32 bit Integer + String. The calc works and give 0,00 if the recs are of TYPE 32 bit integer +STRING. It&amp;nbsp;gives a result of -0,00 when it has a record&amp;nbsp;TYPE of DOUBLE+STRING.&amp;nbsp;I tried formatting all&amp;nbsp;input amounts&amp;nbsp;with MONEY format and still does not&amp;nbsp;work. How can I get the 0,00 result without the -0,00? Thank you! Is there also a way to check the field if there is a -0,00 and&amp;nbsp;then make it 0,00?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 16:00:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1513734#M36912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-28T16:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: After calc on Double String and 32 bit Integer + String TYPE recs gives a -0,00.</title>
      <link>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1513962#M36913</link>
      <description>is this for Qlik  Sense or QlikView?</description>
      <pubDate>Thu, 29 Nov 2018 02:21:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1513962#M36913</guid>
      <dc:creator>Melissa_Potvin</dc:creator>
      <dc:date>2018-11-29T02:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: After calc on Double String and 32 bit Integer + String TYPE recs gives a -0,00.</title>
      <link>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1514341#M36914</link>
      <description>&lt;P&gt;Qlik Sense.&lt;/P&gt;&lt;P&gt;Here is an example:&lt;/P&gt;&lt;P&gt;Input file has a field ([.AMOUNT]) that is forced to MONEY and saved as WBS_AMOUNT_SE:&lt;/P&gt;&lt;P&gt;CODE: MONEY ([.Amount]) as WBS_AMOUNT_SE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WBS_AMOUNT_SE Record 1: 111,40&lt;/P&gt;&lt;P&gt;WBS_AMOUNT_SE Record 1: 132,71&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use software called Q-EYE that looks at the qvd file.&lt;/P&gt;&lt;P&gt;In Q-EYE:&lt;/P&gt;&lt;P&gt;WBS_AMOUNTS_SE Record 1: 111,40 shows TYPE of DOUBLE+STRING&lt;/P&gt;&lt;P&gt;WBS_AMOUNTS_SE Record 1: 132,71 shows TYPE of DOUBLE+STRING&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then WBS_AMOUNT_SE is multiplied by 1000 and saved as AMOUNT_1K&lt;/P&gt;&lt;P&gt;CODE: Load *, money(WBS_AMOUNT_SE * (1000)) as AMOUNT_1K&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ISSUE:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But then &lt;U&gt;after&lt;/U&gt; I do the calc (WBS_AMOUNT_SE * 1000) and store as AMOUNT_1K it gives different result TYPES:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;AMOUNT_1K (111.400,00) has a TYPE of 32 BIT Integer + STRING&lt;/P&gt;&lt;P&gt;AMOUNT_1K (132.710,00) has a TYPE of DOUBLE + STRING&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: the numbers visibly look correct in Q-Eye and Excel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When I do a calc on AMOUNT_1K - SUMSAP, for one I get 0,00 and the other one get -0,00.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The record that had TYPE DOUBLE+STRING after it was multiplied by 1000 gives a -0,00.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The other one that started with TYPE DOUBLE+STRING and changed to 32 BIT Integer + STRING TYPE gives a correct result of -0,00.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;CODE: Load *, money((AMOUNT_1K) – (SUMSAP)) as CHECK1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AMOUNT_1K (111.400,00) – SUMSAP (111.400,00) = 0,00&lt;/P&gt;&lt;P&gt;AMOUNT_1K (132.710,00) – SUMSAP (132.710,00) = -0,00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also try to force if CHECK1 is (-0,00) to change it to CHECK (0,00) but still gives (-0,00):&lt;/P&gt;&lt;P&gt;CODE: Load *, IF (CHECK1 = ‘-0,00’, ‘0,00’, CHECK1) as CHECK&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 15:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1514341#M36914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-29T15:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: After calc on Double String and 32 bit Integer + String TYPE recs gives a -0,00.</title>
      <link>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1514460#M36915</link>
      <description>&lt;P&gt;Have you tried to round your numbers to two decimals instead of just formatting?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Load *,&lt;STRONG&gt; Round(CHECK1, 0.01) as CHECK&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 17:54:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1514460#M36915</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2018-11-29T17:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: After calc on Double String and 32 bit Integer + String TYPE recs gives a -0,00.</title>
      <link>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1514462#M36916</link>
      <description>&lt;P&gt;Yes, thank you.&lt;/P&gt;&lt;P&gt;That worked!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 18:00:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/After-calc-on-Double-String-and-32-bit-Integer-String-TYPE-recs/m-p/1514462#M36916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-29T18:00:19Z</dc:date>
    </item>
  </channel>
</rss>

