<?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 Basic If statement query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323554#M710880</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Your set analysis expression is an OR where you are saying PG = 'CAC' or 'SA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logically the value in PG can only be one value or another hence when you use AND the condition can never be true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Jun 2011 10:39:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-27T10:39:02Z</dc:date>
    <item>
      <title>Basic If statement query</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323549#M710875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will be a very easy one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an expression in my load script and I am doing an if expression&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if((PG = 'CAC' and PG = 'Sa'), 'Y', 'N') as PG_FLAG &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I keep getting only N when I do a reload and I know that I should be getting Y. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What's wrong with my script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 10:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323549#M710875</guid>
      <dc:creator />
      <dc:date>2011-06-27T10:12:32Z</dc:date>
    </item>
    <item>
      <title>Basic If statement query</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323550#M710876</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;&amp;nbsp;&amp;nbsp; Instead of And use Or. like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if((PG = 'CAC' or PG = 'Sa'), 'Y', 'N')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 10:14:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323550#M710876</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-06-27T10:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Basic If statement query</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323551#M710877</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;Note that QlikView is case sensitive for both field names and values, so the field should be called PG and the possible values in the conditional "CAC" (all uppercase) and "Sa" (mixed).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides, one field (PG) cannot have two different values in the same record, so you will have to change it to OR instead of AND, or do something different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 10:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323551#M710877</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-27T10:16:09Z</dc:date>
    </item>
    <item>
      <title>Basic If statement query</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323552#M710878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My field PG has values of Sa, CAC, Ln and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with set analysis PG ={'CAC', 'Sa'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am just trying to remove the set analysis bit and put it in the script instead to improve performance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using "OR" will mean it will be Y for either choice. I want it to only be Y for both choices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I have been clear enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your anticipated help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 10:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323552#M710878</guid>
      <dc:creator />
      <dc:date>2011-06-27T10:30:10Z</dc:date>
    </item>
    <item>
      <title>Basic If statement query</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323553#M710879</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes you are right or means either choice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; So according to the statement it will only assign Y when your field value is CAC or Sa.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If there is any value other than this, it will assign N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 10:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323553#M710879</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2011-06-27T10:33:47Z</dc:date>
    </item>
    <item>
      <title>Basic If statement query</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323554#M710880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Your set analysis expression is an OR where you are saying PG = 'CAC' or 'SA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logically the value in PG can only be one value or another hence when you use AND the condition can never be true.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gordon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 10:39:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323554#M710880</guid>
      <dc:creator />
      <dc:date>2011-06-27T10:39:02Z</dc:date>
    </item>
    <item>
      <title>Basic If statement query</title>
      <link>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323555#M710881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank you all for your helpful responses&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jun 2011 11:06:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Basic-If-statement-query/m-p/323555#M710881</guid>
      <dc:creator />
      <dc:date>2011-06-27T11:06:59Z</dc:date>
    </item>
  </channel>
</rss>

