<?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: Gap between &amp;quot;if&amp;quot; and set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729331#M541846</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usually Set Analysis is faster - and more importantly - &lt;EM style="text-decoration: underline;"&gt;it is faster for large data sets&lt;/EM&gt;, i.e. when you need the performance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jun 2014 15:33:53 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2014-06-24T15:33:53Z</dc:date>
    <item>
      <title>Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729323#M541838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a graph with this expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( if(Abonnement_paiement='EMV'&amp;nbsp; and (Abonnement_Offre_nom='1 An'&amp;nbsp;&amp;nbsp; or Abonnement_Offre_nom='1 Mois'&lt;/P&gt;&lt;P&gt; or Abonnement_Offre_nom='1 Semaine'&amp;nbsp; or Abonnement_Offre_nom='1 Jour')&amp;nbsp; , Compteur_abonnement_OK)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to put a set analysis instead of it, here is the expression I've tried :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Abonnement_paiement= {'EMV'}, Abonnement_Offre_nom={'1 An', '1 Mois', '1 Semaine', '1 Jour'}&amp;gt;} [Compteur_abonnement_OK])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that I don't get exactly the same results.&lt;/P&gt;&lt;P&gt;I don't get why..&lt;/P&gt;&lt;P&gt;What's the difference between those 2 expressions ? Which one is correct ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 12:17:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729323#M541838</guid>
      <dc:creator />
      <dc:date>2014-06-23T12:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729324#M541839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your fields (&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Abonnement_paiement&lt;/SPAN&gt;, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Abonnement_Offre_nom&lt;/SPAN&gt; and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Compteur_abonnement_OK]&lt;/SPAN&gt;) are found in different tables in the data model, the two methods can return different results. The Set Analysis will most likely return the result you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 12:22:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729324#M541839</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-06-23T12:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729325#M541840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henric&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, one of the fields come from another table.&lt;/P&gt;&lt;P&gt;I will use the set analysis expression then.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I still don't understand why the result is different ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 12:30:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729325#M541840</guid>
      <dc:creator />
      <dc:date>2014-06-23T12:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729326#M541841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set analysis filters the data once for the entire chart you are using, whereas IF filters row-wise. In other words, for your dimension values IF enabled expression would filter based on dimension values, while expression with set analysis would filter for all irrespective of dimension values. Have you considered this fact for your comprehension?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 12:55:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729326#M541841</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-06-23T12:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729327#M541842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The main difference is that the Sum() is made over different ntuples. In Sum(&amp;lt;Field1&amp;gt;), the summation is made in the table where Field1 is found, but in Sum(&amp;lt;Field1&amp;gt; * &amp;lt;Field2&amp;gt;) the summation is made in a new ntuple - in the Cartesian product between Field1 and Field2 - that could have more records that the first table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, you have three fields inside your Sum(), QlikView will create the Cartesian product between these fields and calculate the sum there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 13:15:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729327#M541842</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-06-23T13:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729328#M541843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure I get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you explain here is how the set analysis works, right ?&amp;nbsp; It does all the products between tables and then calculate what I want ?&lt;/P&gt;&lt;P&gt;And so, what does a 'if' do ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again Henric.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 13:49:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729328#M541843</guid>
      <dc:creator />
      <dc:date>2014-06-23T13:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729329#M541844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Sum( {$&amp;lt;Abonnement_paiement={'EMV'}&amp;gt;} [Compteur_abonnement_OK] ) the summation will be made over the rows in the table where [Compteur_abonnement_OK] is found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Sum( If( Abonnement_paiement='EMV', [Compteur_abonnement_OK] )) the summation will be made over the rows in the ntuple created by the Cartesian product between the rows of [Abonnement_paiement] and [Compteur_abonnement_OK], i.e. in a table that probably has more records than in the case above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 14:17:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729329#M541844</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-06-23T14:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729330#M541845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very helpful post.&amp;nbsp; Thank you Henric.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so when is it good to use If(Sum()) vs Set analysis?&amp;nbsp; I have a client that used no set analysis in their applications since 2008 to date because they did not know about Set Analysis.&amp;nbsp; I am in the process of rebuilding their applications and data model to use Set Analysis rather than if-sums.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tell me clients that it is faster thus more efficient than use of if-sum.&amp;nbsp; Is this the case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2014 14:48:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729330#M541845</guid>
      <dc:creator />
      <dc:date>2014-06-23T14:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: Gap between "if" and set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729331#M541846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usually Set Analysis is faster - and more importantly - &lt;EM style="text-decoration: underline;"&gt;it is faster for large data sets&lt;/EM&gt;, i.e. when you need the performance. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 15:33:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Gap-between-quot-if-quot-and-set-analysis/m-p/729331#M541846</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-06-24T15:33:53Z</dc:date>
    </item>
  </channel>
</rss>

