<?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 duplicates problem in sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/duplicates-problem-in-sum/m-p/352069#M130612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem in my chart, i did a chart that count and sum(like showing in the example i added).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem that in the "withdraw" expression the total is without duplicates, and in WD the total is with duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone have an idea, i tried to put DISTINCT but it doesnt work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am adding my expression, if anybody have any idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(if(sum({&amp;lt;YYYY=,MM=,DD=&amp;gt;} FTD)&amp;gt;0 and &lt;/P&gt;&lt;P&gt;sum(if(Aggr((sum(DEPOSITS) - sum(FTD)),USER_NAME)&amp;gt;0,1))=0 and $(mWithdraws)&amp;gt;0,$(mWithdraws),0),&lt;/P&gt;&lt;P&gt;RET_DESK,R_REPRESENTATIVE,USER_NAME,FTD_CAL.FULL_DATE,ACCOUNT_LANG))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Mar 2012 09:46:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-03-14T09:46:38Z</dc:date>
    <item>
      <title>duplicates problem in sum</title>
      <link>https://community.qlik.com/t5/QlikView/duplicates-problem-in-sum/m-p/352069#M130612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem in my chart, i did a chart that count and sum(like showing in the example i added).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem that in the "withdraw" expression the total is without duplicates, and in WD the total is with duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does anyone have an idea, i tried to put DISTINCT but it doesnt work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am adding my expression, if anybody have any idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(aggr(if(sum({&amp;lt;YYYY=,MM=,DD=&amp;gt;} FTD)&amp;gt;0 and &lt;/P&gt;&lt;P&gt;sum(if(Aggr((sum(DEPOSITS) - sum(FTD)),USER_NAME)&amp;gt;0,1))=0 and $(mWithdraws)&amp;gt;0,$(mWithdraws),0),&lt;/P&gt;&lt;P&gt;RET_DESK,R_REPRESENTATIVE,USER_NAME,FTD_CAL.FULL_DATE,ACCOUNT_LANG))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 09:46:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicates-problem-in-sum/m-p/352069#M130612</guid>
      <dc:creator />
      <dc:date>2012-03-14T09:46:38Z</dc:date>
    </item>
    <item>
      <title>duplicates problem in sum</title>
      <link>https://community.qlik.com/t5/QlikView/duplicates-problem-in-sum/m-p/352070#M130613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try Creating a flag for duplicates like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Peek('Field1')=Field1 and peek('Field2')=Field2,1,0) as DuplicateFlag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From datasource;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Before this your data to be ordered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Then Write expression&lt;/P&gt;&lt;P&gt;Without duplicates Sum({&amp;lt;DuplicateFlag={0}&amp;gt;} Field2)&lt;/P&gt;&lt;P&gt;With Duplicates simply use Sum(Field2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 10:26:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicates-problem-in-sum/m-p/352070#M130613</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-03-14T10:26:30Z</dc:date>
    </item>
    <item>
      <title>duplicates problem in sum</title>
      <link>https://community.qlik.com/t5/QlikView/duplicates-problem-in-sum/m-p/352071#M130614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i understand what you mean but i dont know how to do it with my expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Mar 2012 11:14:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/duplicates-problem-in-sum/m-p/352071#M130614</guid>
      <dc:creator />
      <dc:date>2012-03-14T11:14:35Z</dc:date>
    </item>
  </channel>
</rss>

