<?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: if vs set analysis different results in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254730#M1293070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;right!&lt;/P&gt;&lt;P&gt;I can't replace set analysis with if because of possible duplication (I used sum to avoid count(distinct)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Options are:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;1)use count(distinct (name))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;2)create another field with the same value just for selection&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Feb 2017 17:55:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-10T17:55:03Z</dc:date>
    <item>
      <title>if vs set analysis different results</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254728#M1293062</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 different result using set analysis (with intersection) and if functions.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;When i select a field used in set analisys with intersection : &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;all formulas that test the value i selected are correct, formulas with the other possible value (expected 0 because of interesection) no.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;For example (see the attachment):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Fact_Table:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %k_customer, flag, aggr&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, s, s&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, s, s&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, n, n&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;customer:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %k_customer,name, cnt&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, one,1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, two,1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when i select flag =n&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({$*&amp;lt;flag={'s'}&amp;gt;}cnt)&lt;/EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum(if(flag='s',cnt)) &lt;/EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = &lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was expecting 0 because of intersection in setanlaysis. I saw this happen because the value to sum is in another table and the key has both values (s and n)&lt;/P&gt;&lt;P&gt;what's wrong? Do i have to replace all formula with if instead of set analysis ? or create another field with the same value just for selection?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 18:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254728#M1293062</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2026-01-26T18:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set analysis different results</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254729#M1293066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look here:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/1020320#1020320" title="https://community.qlik.com/message/1020320#1020320"&gt;https://community.qlik.com/message/1020320#1020320&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 17:34:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254729#M1293066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T17:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set analysis different results</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254730#M1293070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;right!&lt;/P&gt;&lt;P&gt;I can't replace set analysis with if because of possible duplication (I used sum to avoid count(distinct)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Options are:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;1)use count(distinct (name))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;2)create another field with the same value just for selection&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 17:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254730#M1293070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T17:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set analysis different results</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254731#M1293073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;correct, I think many people aren't aware of the temporary join tables...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 17:59:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254731#M1293073</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T17:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set analysis different results</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254732#M1293075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;another idea:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;sum({&amp;lt;&lt;/EM&gt;&lt;EM&gt;(flag={"=flag='s'"}&lt;/EM&gt;&lt;EM&gt;&amp;gt;} &lt;/EM&gt;&lt;EM&gt;cnt)) &lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 18:09:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254732#M1293075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T18:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set analysis different results</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254733#M1293076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a&amp;nbsp; really good idea!!!!&lt;/P&gt;&lt;P&gt;Thanks a lot Robin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;worked without&lt;STRONG&gt; ()&lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;sum({&amp;lt;flag={"=flag='s'"}&amp;gt;} cnt)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 18:37:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254733#M1293076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T18:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: if vs set analysis different results</title>
      <link>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254734#M1293077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... of course without the parentheses ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Feb 2017 19:05:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-vs-set-analysis-different-results/m-p/1254734#M1293077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T19:05:29Z</dc:date>
    </item>
  </channel>
</rss>

