<?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 Issue with exclude in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-with-exclude-in-set-analysis/m-p/914292#M988144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt; &lt;A href="https://community.qlik.com/qlik-users/10670"&gt;maxgro&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Below is my set analysis expression which works perfectly fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Disc. Bal.] &lt;BR /&gt;/&lt;BR /&gt;SUM({&amp;lt; [Transaction ID]-={$(vTransactionIDsToExclude)}&lt;BR /&gt; ,&amp;nbsp; $(vSecFilter)&lt;BR /&gt; &amp;gt;&lt;BR /&gt; +&lt;BR /&gt; &amp;lt;[Transaction ID]={$(vTransactionIDtoInclude)}&amp;gt;&lt;BR /&gt; +&lt;BR /&gt; &amp;lt;&amp;nbsp;&amp;nbsp; [Active Flag] = {'Active'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Portfolio Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Company Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Region Code]={'60'}&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;} TOTAL( [SEC Amort Discounted Balance]))&lt;/P&gt;&lt;P&gt;[Disc. Bal.] contains following expression:&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; [Transaction ID]-={$(vTransactionIDsToExclude)}&lt;BR /&gt; ,&amp;nbsp; $(vSecFilter)&lt;BR /&gt; , [Original Term]={'&amp;gt;72'}&amp;gt;&lt;BR /&gt; +&lt;BR /&gt; &amp;lt; [Transaction ID]={$(vTransactionIDtoInclude)}&lt;BR /&gt; , [Original Term]={'&amp;gt;72'}&amp;gt;}[SEC Amort Discounted Balance] )&lt;BR /&gt; +&lt;BR /&gt; sum({1&amp;lt;&amp;nbsp;&amp;nbsp; [Active Flag] = {'Active'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Portfolio Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Company Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Region Code]={'60'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Original Term]={'&amp;gt;72'} &amp;gt; &lt;BR /&gt; } &lt;BR /&gt; [SEC Amort Discounted Balance] )&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;But I now have a new requirement to exclude current selection. So I added '1' but now I'm getting very wierd results. Can anyone explain me the issue in my expression&lt;BR /&gt;Note: I only want to exclude from Active Flag, Portfolio COde, Company Code and Region Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Disc. Bal.] &lt;BR /&gt;/&lt;BR /&gt;SUM({&amp;lt; [Transaction ID]-={$(vTransactionIDsToExclude)}&lt;BR /&gt; ,&amp;nbsp; $(vSecFilter)&lt;BR /&gt; &amp;gt;&lt;BR /&gt; +&lt;BR /&gt; &amp;lt;[Transaction ID]={$(vTransactionIDtoInclude)}&amp;gt;} TOTAL( [SEC Amort Discounted Balance]))&lt;/P&gt;&lt;P&gt; +&lt;BR /&gt;sum({1 &amp;lt;&amp;nbsp;&amp;nbsp; [Active Flag] = {'Active'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Portfolio Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Company Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Region Code]={'60'}&amp;gt; &lt;BR /&gt;} TOTAL( [SEC Amort Discounted Balance]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2015 14:47:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-07-24T14:47:59Z</dc:date>
    <item>
      <title>Issue with exclude in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-exclude-in-set-analysis/m-p/914292#M988144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt; &lt;A href="https://community.qlik.com/qlik-users/10670"&gt;maxgro&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Below is my set analysis expression which works perfectly fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Disc. Bal.] &lt;BR /&gt;/&lt;BR /&gt;SUM({&amp;lt; [Transaction ID]-={$(vTransactionIDsToExclude)}&lt;BR /&gt; ,&amp;nbsp; $(vSecFilter)&lt;BR /&gt; &amp;gt;&lt;BR /&gt; +&lt;BR /&gt; &amp;lt;[Transaction ID]={$(vTransactionIDtoInclude)}&amp;gt;&lt;BR /&gt; +&lt;BR /&gt; &amp;lt;&amp;nbsp;&amp;nbsp; [Active Flag] = {'Active'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Portfolio Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Company Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Region Code]={'60'}&amp;gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;} TOTAL( [SEC Amort Discounted Balance]))&lt;/P&gt;&lt;P&gt;[Disc. Bal.] contains following expression:&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; [Transaction ID]-={$(vTransactionIDsToExclude)}&lt;BR /&gt; ,&amp;nbsp; $(vSecFilter)&lt;BR /&gt; , [Original Term]={'&amp;gt;72'}&amp;gt;&lt;BR /&gt; +&lt;BR /&gt; &amp;lt; [Transaction ID]={$(vTransactionIDtoInclude)}&lt;BR /&gt; , [Original Term]={'&amp;gt;72'}&amp;gt;}[SEC Amort Discounted Balance] )&lt;BR /&gt; +&lt;BR /&gt; sum({1&amp;lt;&amp;nbsp;&amp;nbsp; [Active Flag] = {'Active'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Portfolio Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Company Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Region Code]={'60'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Original Term]={'&amp;gt;72'} &amp;gt; &lt;BR /&gt; } &lt;BR /&gt; [SEC Amort Discounted Balance] )&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;But I now have a new requirement to exclude current selection. So I added '1' but now I'm getting very wierd results. Can anyone explain me the issue in my expression&lt;BR /&gt;Note: I only want to exclude from Active Flag, Portfolio COde, Company Code and Region Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Disc. Bal.] &lt;BR /&gt;/&lt;BR /&gt;SUM({&amp;lt; [Transaction ID]-={$(vTransactionIDsToExclude)}&lt;BR /&gt; ,&amp;nbsp; $(vSecFilter)&lt;BR /&gt; &amp;gt;&lt;BR /&gt; +&lt;BR /&gt; &amp;lt;[Transaction ID]={$(vTransactionIDtoInclude)}&amp;gt;} TOTAL( [SEC Amort Discounted Balance]))&lt;/P&gt;&lt;P&gt; +&lt;BR /&gt;sum({1 &amp;lt;&amp;nbsp;&amp;nbsp; [Active Flag] = {'Active'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Portfolio Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Company Code]={'1'}&lt;BR /&gt;&amp;nbsp; ,&amp;nbsp; [Region Code]={'60'}&amp;gt; &lt;BR /&gt;} TOTAL( [SEC Amort Discounted Balance]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sachin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 14:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-exclude-in-set-analysis/m-p/914292#M988144</guid>
      <dc:creator />
      <dc:date>2015-07-24T14:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with exclude in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-with-exclude-in-set-analysis/m-p/914293#M988145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You've split your one sum into two, why have you done this?&lt;/P&gt;&lt;P&gt;And now only the first sum acts as divisor for the [Disc. Bal.] dividend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All in all, a quite different expression. Won't be suprised if you get very different results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what you are really trying to achieve, creating a correct set expression in complex cases as you seem to work on needs a thorough understanding of the data model. So I can't really tell more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jul 2015 08:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-with-exclude-in-set-analysis/m-p/914293#M988145</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-07-25T08:39:49Z</dc:date>
    </item>
  </channel>
</rss>

