<?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: Wrong sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586157#M685142</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you want a sum(distinct [Inv AmountNum]). You seem to have a lot of duplicate records. You can see this if you add another expression to your straight table: count([Inv AmountNum]). You'll see there are 249 records with an Inv AmountNum value of 649.35.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Feb 2014 09:25:58 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2014-02-14T09:25:58Z</dc:date>
    <item>
      <title>Wrong sum</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586156#M685141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am loading a spreadsheet that has been saved as a text file to speed up the download.&lt;/P&gt;&lt;P&gt;Because of that the trailing minus is not respected.&lt;/P&gt;&lt;P&gt;I can solve the problem apply this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;num(if(right([Inv Amount],1) = '-',0-left([Inv Amount],len([Inv Amount])-1),[Inv Amount])) as [Inv AmountNum]&lt;/P&gt;&lt;P&gt;The numbers are correctly being retrieved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem comes when I apply a sum with the field in question in an expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sum issue.jpg" class="jive-image" src="/legacyfs/online/53186_Sum issue.jpg" style="width: 620px; height: 152px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is were I lost it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No idea why this is happening.&amp;nbsp; Hope you do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kristel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 09:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586156#M685141</guid>
      <dc:creator />
      <dc:date>2014-02-14T09:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong sum</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586157#M685142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you want a sum(distinct [Inv AmountNum]). You seem to have a lot of duplicate records. You can see this if you add another expression to your straight table: count([Inv AmountNum]). You'll see there are 249 records with an Inv AmountNum value of 649.35.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 09:25:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586157#M685142</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-02-14T09:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong sum</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586158#M685143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert is correct, you're getting 161688.5 because its 249*649.35. Unfortunately for your sanity QlikView is giving you the correct answer! You should consider your data model again, maybe distinct load your text file? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 09:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586158#M685143</guid>
      <dc:creator>kouroshkarimi</dc:creator>
      <dc:date>2014-02-14T09:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong sum</title>
      <link>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586159#M685144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, this is where it is going wrong.&lt;/P&gt;&lt;P&gt;I am now loading each tab one by one to understand where the duplication occurs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fresh eyes looking at your own stuff is always helping.&lt;/P&gt;&lt;P&gt;Again many thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 09:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Wrong-sum/m-p/586159#M685144</guid>
      <dc:creator />
      <dc:date>2014-02-14T09:37:01Z</dc:date>
    </item>
  </channel>
</rss>

