<?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 If then elseif in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303080#M1202552</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(CT_YEAR = 'C','2010',if(CT_YEAR = 'L','2009',if(CT_YEAR = 'N','2011'))) as ACYear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please try the above script .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Feb 2011 18:13:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-02T18:13:55Z</dc:date>
    <item>
      <title>If then elseif</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303079#M1202551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;I currently have the following within my script to load a qvd file :&lt;/P&gt;&lt;P&gt;if(CT_YEAR = 'C', 2010, if(CT_YEAR = 'L', 2009)) as [ACYear],&lt;/P&gt;&lt;P&gt;I'd like to cater for another option 'N' :&lt;/P&gt;&lt;P&gt;if CT_YEAR = 'C' then&lt;BR /&gt; ACYear = '2010'&lt;BR /&gt;elseif CT_YEAR = 'L' then&lt;BR /&gt; ACYear='2009'&lt;BR /&gt;elseif CT_YEAR = 'N' then&lt;BR /&gt; ACYear ='2011'&lt;BR /&gt;endif&lt;/P&gt;&lt;P&gt;Can anyone advise how to set this up within the load script?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 17:59:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303079#M1202551</guid>
      <dc:creator />
      <dc:date>2011-02-02T17:59:04Z</dc:date>
    </item>
    <item>
      <title>If then elseif</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303080#M1202552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(CT_YEAR = 'C','2010',if(CT_YEAR = 'L','2009',if(CT_YEAR = 'N','2011'))) as ACYear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please try the above script .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 18:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303080#M1202552</guid>
      <dc:creator />
      <dc:date>2011-02-02T18:13:55Z</dc:date>
    </item>
    <item>
      <title>If then elseif</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303081#M1202553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;If&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9999 is the catchall error&lt;/P&gt;(CT_YEAR = 'C', '2010', &lt;B&gt;If&lt;/B&gt; (CT_YEAR = 'L','2009', &lt;B&gt;If&lt;/B&gt; (CT_YEAR = 'N','2011', '9999'))) As ACYear, &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 18:15:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303081#M1202553</guid>
      <dc:creator />
      <dc:date>2011-02-02T18:15:16Z</dc:date>
    </item>
    <item>
      <title>If then elseif</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303082#M1202554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may be missing somehting but the way I'd do the above is:&lt;/P&gt;&lt;P&gt;=if(CT_YEAR = 'C','2010',if(CT_YEAR = 'L','2009',if(CT_YEAR = 'N','2011','Outside Range'))) as ACYear,&lt;/P&gt;&lt;P&gt;Just like a running IF expression in Excel.&lt;/P&gt;&lt;P&gt;Alternatively look into using a Mapping load and 'Apply Map' in the script.&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Matt - Visual Analytics Ltd&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 18:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303082#M1202554</guid>
      <dc:creator>matt_crowther</dc:creator>
      <dc:date>2011-02-02T18:18:48Z</dc:date>
    </item>
    <item>
      <title>If then elseif</title>
      <link>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303083#M1202555</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 tried the solution given by priyadashin and it worked fine. Thanks to everyone who replied.&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 10:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-then-elseif/m-p/303083#M1202555</guid>
      <dc:creator />
      <dc:date>2011-02-03T10:27:55Z</dc:date>
    </item>
  </channel>
</rss>

