<?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 Set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447447#M166949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have some problem with an expression.&lt;/P&gt;&lt;P&gt;At the moment I have this espression (in my pivot table) that works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) = 'Escludi'&lt;BR /&gt; ,//THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; },&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//ELSE&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({ $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; }&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, sometimes I have some problem with the memory of my object (pivot table).&lt;/P&gt;&lt;P&gt;I know that IF statement is not so good for performance so, I'm trying to put my IF in the set analysis.&lt;/P&gt;&lt;P&gt;I've just tried this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; }, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$( =if(GetFieldSelections(Text) = 'Escludi', Partite.FCONTO= {"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"} ) )&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; } &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No error are mensioned but it doesn't show what I'm expecting to have (the result is ZERO on every row of my table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion to improve my expression ?&lt;/P&gt;&lt;P&gt;Am I well imported the IF in the set analysis ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2012 11:15:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-18T11:15:04Z</dc:date>
    <item>
      <title>Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447447#M166949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have some problem with an expression.&lt;/P&gt;&lt;P&gt;At the moment I have this espression (in my pivot table) that works perfectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) = 'Escludi'&lt;BR /&gt; ,//THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; },&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//ELSE&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({ $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; }&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, sometimes I have some problem with the memory of my object (pivot table).&lt;/P&gt;&lt;P&gt;I know that IF statement is not so good for performance so, I'm trying to put my IF in the set analysis.&lt;/P&gt;&lt;P&gt;I've just tried this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; }, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$( =if(GetFieldSelections(Text) = 'Escludi', Partite.FCONTO= {"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"} ) )&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; } &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No error are mensioned but it doesn't show what I'm expecting to have (the result is ZERO on every row of my table).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestion to improve my expression ?&lt;/P&gt;&lt;P&gt;Am I well imported the IF in the set analysis ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 11:15:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447447#M166949</guid>
      <dc:creator />
      <dc:date>2012-12-18T11:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447448#M166950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think there is an error in the 'THEN' sum expression.&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) = 'Escludi'&lt;BR /&gt;,//THEN&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; },&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;= {"*"}-{&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;"G*"&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;//ELSE&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({ $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; }&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 11:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447448#M166950</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-18T11:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447449#M166951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janusz,&lt;/P&gt;&lt;P&gt;thanks.&lt;/P&gt;&lt;P&gt;At the moment this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) = 'Escludi'&lt;BR /&gt; ,//THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; },&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//ELSE&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({ $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; }&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;works perfectly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;What I'm to do is change that expression in this one:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; }, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$( =if(GetFieldSelections(Text) = 'Escludi', Partite.FCONTO= {"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"} ) )&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; } &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Unfortunately it doesn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;I'm trying to understand why.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Thanks a lot&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 12:53:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447449#M166951</guid>
      <dc:creator />
      <dc:date>2012-12-18T12:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447450#M166952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure why you want to do it this way, but this is your call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; }, &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; ={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$( $(=if(GetFieldSelections(Text) = 'Escludi', 'Partite.FCONTO= {"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"}')))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; } &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 13:39:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447450#M166952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-18T13:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447451#M166953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;unfortunately it doesn't work. The result is still zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About the other expression. &lt;/P&gt;&lt;P&gt;Your way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) = 'Escludi'&lt;BR /&gt;,//THEN&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; },&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;= {"*"}-{&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;"G*"&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;//ELSE&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({ $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; }&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;it's very interesting. THANKS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;I'm trying to change this way to write the expression because I have some performance problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;I know that eliminating if statement you can improve the performance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;THANK YOU very much for your help. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;I'm really appreciating.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 13:50:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447451#M166953</guid>
      <dc:creator />
      <dc:date>2012-12-18T13:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447452#M166954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By removing the if statement from the aggregation expression gives you performance improvement. &lt;/P&gt;&lt;P&gt;In your case it will change nothing. There must be something else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I would check the data model to make sure that it has been created according to the 'best practices'. You can search community for more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 13:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447452#M166954</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-18T13:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447453#M166955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see.&lt;/P&gt;&lt;P&gt;Thank you Janusz.&lt;/P&gt;&lt;P&gt;My thread is been created because of my performance problem.&lt;/P&gt;&lt;P&gt;That expression is on a pivot table that often give me the message "out of memory".&lt;/P&gt;&lt;P&gt;I was trying to resolve this problem.&lt;/P&gt;&lt;P&gt;I have only three tables on my data model and the biggest table have 3.6 millions of records.&lt;/P&gt;&lt;P&gt;Thank you so much for your kindness.&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Giampiero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2012 14:07:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447453#M166955</guid>
      <dc:creator />
      <dc:date>2012-12-18T14:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447454#M166956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janusz,&lt;/P&gt;&lt;P&gt;I made a simple test to understand my performance problem.&lt;/P&gt;&lt;P&gt;As you remember I have this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;) = 'Escludi'&lt;BR /&gt; ,//THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; },&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: green;"&gt;//ELSE&lt;BR /&gt; &lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({ $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; }&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt; ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;It works perfectly but I have serious performance problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;I thought the problem was my if statement, so i tried to eliminate the IF and i was trying this expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; }, &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; ={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$( $(=if(GetFieldSelections(Text) = 'Escludi', 'Partite.FCONTO= {"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"}')))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; } &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Unfortunately it doesn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Just to be sure it's the IF statement the problem, yesterday I chenged my expression writing only:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;({ $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; }&amp;gt; } &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;Now I don't have any more performance problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;I can't use this expression and I have to make right this one&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; }, &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; ={ &lt;/SPAN&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;$( $(=if(GetFieldSelections(Text) = 'Escludi', 'Partite.FCONTO= {"&amp;lt;&amp;gt;Partite.FCONTO like 'G*'"}')))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; } &amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Have you some suggestion to help me ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Thank you so much&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;Giampiero&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 10:00:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447454#M166956</guid>
      <dc:creator />
      <dc:date>2012-12-19T10:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447455#M166957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try to replace your expression with the one from my first reply?&lt;/P&gt;&lt;P&gt;Do you still have a performance issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 10:18:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447455#M166957</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-19T10:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447456#M166958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes i did it.&lt;/P&gt;&lt;P&gt;Nothing changed.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Giampiero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 10:20:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447456#M166958</guid>
      <dc:creator />
      <dc:date>2012-12-19T10:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447457#M166959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you post the Table Viewer screenshot so I can understand more your data model, please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the chart type that you execute the expression for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using the QV 11?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 10:34:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447457#M166959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-19T10:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447458#M166960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;no proble.&lt;/P&gt;&lt;P&gt;I'm using QV 11.&lt;/P&gt;&lt;P&gt;The chart type is a pivot table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 10:53:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447458#M166960</guid>
      <dc:creator />
      <dc:date>2012-12-19T10:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447459#M166961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;Partite.FCONTO&lt;/EM&gt;&lt;/STRONG&gt; field is a key field, and the best practise is not to use the key fields in the calculation expressions. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that the &lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;EM style="font-size: 9pt; color: gray; font-family: 'Courier New';"&gt;Partite.FCONTO&lt;/EM&gt;&lt;/STRONG&gt; is a text field, so I suggest to keep it as it is in the Partite table, and create a new field just for the linkage purpose. I suggest to use the autonumberhash128 function to create a key between those two tables. Please, search the community for the best practices of the data modelling in QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 12:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447459#M166961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-19T12:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447460#M166962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janusz,&lt;/P&gt;&lt;P&gt;THANK YOU so much.&lt;/P&gt;&lt;P&gt;I really appreciated your help.&lt;/P&gt;&lt;P&gt;I'll try to follow your way for those two tables.&lt;/P&gt;&lt;P&gt;At the same time, I'll try to solve the problem of the expression.&lt;/P&gt;&lt;P&gt;If you have any idea about it, I'll be grateful for the help.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Giampiero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 12:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447460#M166962</guid>
      <dc:creator />
      <dc:date>2012-12-19T12:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447461#M166963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe your issue is strictly related to the fact that this field is a key field.&lt;/P&gt;&lt;P&gt;Changing that should do the work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 13:05:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447461#M166963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-19T13:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447462#M166964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll try.&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Giampiero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 13:09:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447462#M166964</guid>
      <dc:creator />
      <dc:date>2012-12-19T13:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447463#M166965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I did it.&lt;/P&gt;&lt;P&gt;I changed my expression as above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;D_LIV1={ECO},Partite.Anno={ $(vvMaxYear) }, Partite.FCONTO = {$(=if(GetFieldSelections(Text) = 'Escludi' , '"*"}-{"G*"', '"*"'))} &amp;gt;} Partite.WRBTR)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works and my performances are much better now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I'm going to change the key as you told me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANK YOU so much for your help.&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Giampiero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 13:34:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447463#M166965</guid>
      <dc:creator />
      <dc:date>2012-12-19T13:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447464#M166966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Giampiero,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You really overcomplicate that. &lt;/P&gt;&lt;P&gt;I've already written that the main problem is with the fact that you've used the key field in the expression.&lt;/P&gt;&lt;P&gt;So, you need to change that, and use your original expression (with my small change) and you should be fine:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;GetFieldSelections&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;) = 'Escludi'&lt;BR /&gt;,//THEN&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.FCONTO&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;= {&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;"*"}-{"G*"&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: green;"&gt;//ELSE&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;({ $&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;D_LIV1&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ECO},&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.Anno&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;={ &lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;STRONG style="color: gray; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;EM&gt;$(vvMaxYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt; }&amp;gt; }&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;Partite.WRBTR&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again, the priority is to change the data model first!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Janusz&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW. I don't believe that your last reply should be actually marked as an answer to this conversation. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 14:50:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447464#M166966</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-19T14:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447465#M166967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Janusz,&lt;/P&gt;&lt;P&gt;I understand what you're saying about the solution.&lt;/P&gt;&lt;P&gt;I understand that the best way is to change the data model as you told me.&lt;/P&gt;&lt;P&gt;I still have to try your solution to see if it can give me the same results ... our customer is not so patient &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I really don't want to mark my last reply to have point but to help other people.&lt;/P&gt;&lt;P&gt;For that reason I marked "OK" my last reply.&lt;/P&gt;&lt;P&gt;So, you're right when you say that, but I'd like to show to someonelse that this thread could be useful to give help&amp;nbsp; with IF statement in SETANALYSIS (and I thought the best way it was to mark the thread as solved).&lt;/P&gt;&lt;P&gt;I say again, THANK YOU so much for your precious help.&lt;/P&gt;&lt;P&gt;I'll follow your suggestion with data model.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Giampiero&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 15:14:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis/m-p/447465#M166967</guid>
      <dc:creator />
      <dc:date>2012-12-19T15:14:10Z</dc:date>
    </item>
  </channel>
</rss>

