<?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: Duplicate problem with alt-statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391434#M484896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That wouldn't work. The reason why I need to use "alt"-statement here is that I want to include onlu those rows into calculation where Billing day doesn't exist, so with the normal if formula I get nothing. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 May 2013 13:15:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-05-21T13:15:11Z</dc:date>
    <item>
      <title>Duplicate problem with alt-statement</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391432#M484894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I have following script in expression. &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;DIV&gt;=sum(if(alt([Billing Day],0)=0,([Order quantity_WMENG]*Net_Price/ExhRate,0))&lt;BR /&gt;&lt;BR /&gt; &lt;/DIV&gt;&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;For some reason this this formula sums everything twice and I can't see what is the problem. Would you have any ideas. The formula calculates properly without if(alt statement, but with that all results are multiplied with 2. There shouldn't be any duplicate rows in my data model; all these needed values are only once in my data model. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Many thanks already beforehand &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000; font-size: 10pt;"&gt;Janne&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:08:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391432#M484894</guid>
      <dc:creator />
      <dc:date>2013-05-21T13:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate problem with alt-statement</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391433#M484895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;=if([Billing Day]=0,sum(Distinct&amp;nbsp; ([Order quantity_WMENG]*Net_Price) / ExhRate),0)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:12:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391433#M484895</guid>
      <dc:creator />
      <dc:date>2013-05-21T13:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate problem with alt-statement</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391434#M484896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That wouldn't work. The reason why I need to use "alt"-statement here is that I want to include onlu those rows into calculation where Billing day doesn't exist, so with the normal if formula I get nothing. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:15:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391434#M484896</guid>
      <dc:creator />
      <dc:date>2013-05-21T13:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate problem with alt-statement</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391435#M484897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try your expression with distinct function&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Arial; font-size: 11.111111640930176px; background-color: #ffffff;"&gt;sum(distinct if(alt([Billing Day],0)=0,([Order quantity_WMENG]*Net_Price/ExhRate,0))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Arial; font-size: 11.111111640930176px; background-color: #ffffff;"&gt;if problem doesn't solve then try this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Arial; font-size: 11.111111640930176px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Arial; font-size: 11.111111640930176px; background-color: #ffffff;"&gt;sum(distinct if([Billing Day]=0,([Order quantity_WMENG]*Net_Price/ExhRate,0)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Arial; font-size: 11.111111640930176px; background-color: #ffffff;"&gt;hope it helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-family: Arial; font-size: 11.111111640930176px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:16:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391435#M484897</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-05-21T13:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Duplicate problem with alt-statement</title>
      <link>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391436#M484898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great! the first one did work! Many thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Janne&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 May 2013 13:19:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Duplicate-problem-with-alt-statement/m-p/391436#M484898</guid>
      <dc:creator />
      <dc:date>2013-05-21T13:19:07Z</dc:date>
    </item>
  </channel>
</rss>

