<?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 statement error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624858#M595870</link>
    <description>&lt;P&gt;You can give this a shot&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If([Project Model Name]= 'General Product or Process', Pick([Current Phase ID], 'Preliminary Investigation', 'Business Case', 'Product Development', 'Process Development', 'Launch', 'Post-Launch'),

If([Project Model Name]= 'Fast Track Stage-Gate', Pick([Current Phase ID], 'Product Development', 'Process Development', 'Launch', 'Post-Launch'),

If([Project Model Name]= 'Specialty Compounds Stage Gate Model', Pick([Current Phase ID], 'Define', 'Development', 'Validation', 'Launch', 'Post-Launch')))) as [Project Current Stage]&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 17 Sep 2019 18:53:00 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-09-17T18:53:00Z</dc:date>
    <item>
      <title>If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624844#M595867</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I am trying to add If statements to a load script, but am encountering an error that seems like there is a limit to the number of If statements you can have.&lt;/P&gt;&lt;P&gt;Here is the section of the load statement I am trying to update:&lt;/P&gt;&lt;P&gt;LOAD ProjectID_SYS,&lt;BR /&gt;If([Project Model Name]= 'General Product or Process',&lt;BR /&gt;If([Current Phase ID]= 1,'Preliminary Investigation',&lt;BR /&gt;If([Current Phase ID]= 2,'Business Case',&lt;BR /&gt;If([Current Phase ID]= 3,'Product Development',&lt;BR /&gt;If([Current Phase ID]= 4,'Process Development',&lt;BR /&gt;If([Current Phase ID]= 5,'Launch','Post-Launch'&lt;BR /&gt;))))),&lt;/P&gt;&lt;P&gt;If([Project Model Name]= 'Fast Track Stage-Gate',&lt;BR /&gt;If([Current Phase ID]= 1,'Product Development',&lt;BR /&gt;If([Current Phase ID]= 2,'Process Development',&lt;BR /&gt;If([Current Phase ID]= 3,'Launch','Post-Launch'&lt;BR /&gt;)))),&lt;/P&gt;&lt;P&gt;If([Project Model Name]= 'Specialty Compounds Stage Gate Model',&lt;BR /&gt;If([Current Phase ID]= 1,'Define',&lt;BR /&gt;If([Current Phase ID]= 2,'Development',&lt;BR /&gt;If([Current Phase ID]= 3,'Validation',&lt;BR /&gt;If([Current Phase ID]= 4,'Launch','Post-Launch'&lt;BR /&gt;))))))&lt;BR /&gt;as [Project Current Stage]&lt;BR /&gt;RESIDENT [Project Details];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to add the third Project Model Name If statement, I get an error that states: &lt;U&gt;Error in expression: If takes 2-3 parameters&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:27:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624844#M595867</guid>
      <dc:creator>JAlex</dc:creator>
      <dc:date>2024-11-16T02:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624847#M595868</link>
      <description>&lt;P&gt;I don't see why it should not work. Check your commas and parentheses to make sure they are correct.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 18:41:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624847#M595868</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-09-17T18:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624853#M595869</link>
      <description>&lt;P&gt;Hi Vegar. Yes, I have checked syntax and no errors there. This is error:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/t5/image/serverpage/image-id/19402i95C16792396B453D/image-size/medium?v=1.0&amp;amp;px=-1" border="0" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 18:47:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624853#M595869</guid>
      <dc:creator>JAlex</dc:creator>
      <dc:date>2019-09-17T18:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624858#M595870</link>
      <description>&lt;P&gt;You can give this a shot&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If([Project Model Name]= 'General Product or Process', Pick([Current Phase ID], 'Preliminary Investigation', 'Business Case', 'Product Development', 'Process Development', 'Launch', 'Post-Launch'),

If([Project Model Name]= 'Fast Track Stage-Gate', Pick([Current Phase ID], 'Product Development', 'Process Development', 'Launch', 'Post-Launch'),

If([Project Model Name]= 'Specialty Compounds Stage Gate Model', Pick([Current Phase ID], 'Define', 'Development', 'Validation', 'Launch', 'Post-Launch')))) as [Project Current Stage]&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 17 Sep 2019 18:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624858#M595870</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-17T18:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624862#M595871</link>
      <description>&lt;P&gt;Hi Sunny - I am not quite sure how you did that, but it appears to be working as expected. I will need to read up on the PICK statement asap . Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 19:04:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624862#M595871</guid>
      <dc:creator>JAlex</dc:creator>
      <dc:date>2019-09-17T19:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624866#M595872</link>
      <description>&lt;P&gt;The solution of&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp; will only work&amp;nbsp;for the 'post-launch'&amp;nbsp; if post-launch got the corresponding [Current Phase ID] per Project Model Name.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, I found the "error" in your IF. If you still want to use it then you can restructure it like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LOAD ProjectID_SYS,
If(  [Project Model Name]= 'General Product or Process',
  If(  [Current Phase ID]= 1,'Preliminary Investigation',
    If(  [Current Phase ID]= 2,'Business Case',
      If(  [Current Phase ID]= 3,'Product Development',
        If(  [Current Phase ID]= 4,'Process Development',
          If(  [Current Phase ID]= 5,'Launch',
            If(  [Project Model Name]= 'Fast Track Stage-Gate',
              If(  [Current Phase ID]= 1,'Product Development',
                If(  [Current Phase ID]= 2,'Process Development',
                  If([Current Phase ID]= 3,'Launch',
                    If([Project Model Name]= 'Specialty Compounds Stage Gate Model',
                      If([Current Phase ID]= 1,'Define',
                        If([Current Phase ID]= 2,'Development',
                          If([Current Phase ID]= 3,'Validation',
                            If([Current Phase ID]= 4,'Launch',
                              'Post-Launch'    
) ) ) ) ) ) ) ) ) ) ) ) ) ) ) as [Project Current Stage]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 19:28:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1624866#M595872</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2019-09-17T19:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1625297#M595873</link>
      <description>&lt;P&gt;Agree with&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/25001"&gt;@Vegar&lt;/a&gt;&amp;nbsp;, but Vegar there are ways around it rather than writing a huge if statement&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 13:29:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/1625297#M595873</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-09-18T13:29:20Z</dc:date>
    </item>
  </channel>
</rss>

