<?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 Nested IF or use variable? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-IF-or-use-variable/m-p/218561#M504994</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a newbie. Currently I am using nested IFs in a LOAD statement. Something like this:&lt;/P&gt;&lt;P&gt;LOAD Region,&lt;/P&gt;&lt;P&gt;IF (Region='UK','Europe',&lt;/P&gt;&lt;P&gt;IF (Region='Germany','Europe',&lt;/P&gt;&lt;P&gt;IF (Region='France','Europe, Region) AS WWRegion,&lt;/P&gt;&lt;P&gt;This works fine but I am loading several tables from several data sources and have to use this same structure and values in several LOAD statements. If I add another country to Europe, I need to go modify the script in several places. I am wanting to setup some sort of variable that is a table or set of values. Something like this:&lt;/P&gt;&lt;P&gt;SET EUCountries = {'UK','Germany','France'};&lt;/P&gt;&lt;P&gt;LOAD Region&lt;/P&gt;&lt;P&gt;IF (Region=EUCountries,'Europe',Region) AS WWRegion,&lt;/P&gt;&lt;P&gt;Is this something that can be done in a QlikView script? If so, what is the specific syntax?&lt;/P&gt;&lt;P&gt;Any help is appreciated. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Oct 2009 04:00:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-10-17T04:00:11Z</dc:date>
    <item>
      <title>Nested IF or use variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-or-use-variable/m-p/218561#M504994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a newbie. Currently I am using nested IFs in a LOAD statement. Something like this:&lt;/P&gt;&lt;P&gt;LOAD Region,&lt;/P&gt;&lt;P&gt;IF (Region='UK','Europe',&lt;/P&gt;&lt;P&gt;IF (Region='Germany','Europe',&lt;/P&gt;&lt;P&gt;IF (Region='France','Europe, Region) AS WWRegion,&lt;/P&gt;&lt;P&gt;This works fine but I am loading several tables from several data sources and have to use this same structure and values in several LOAD statements. If I add another country to Europe, I need to go modify the script in several places. I am wanting to setup some sort of variable that is a table or set of values. Something like this:&lt;/P&gt;&lt;P&gt;SET EUCountries = {'UK','Germany','France'};&lt;/P&gt;&lt;P&gt;LOAD Region&lt;/P&gt;&lt;P&gt;IF (Region=EUCountries,'Europe',Region) AS WWRegion,&lt;/P&gt;&lt;P&gt;Is this something that can be done in a QlikView script? If so, what is the specific syntax?&lt;/P&gt;&lt;P&gt;Any help is appreciated. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2009 04:00:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-or-use-variable/m-p/218561#M504994</guid>
      <dc:creator />
      <dc:date>2009-10-17T04:00:11Z</dc:date>
    </item>
    <item>
      <title>Nested IF or use variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-or-use-variable/m-p/218562#M504995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use of mapping tables will be an easier and generalized approach.&lt;/P&gt;&lt;P&gt;1. Creata a mapping table with country as key and region as the mapped field&lt;/P&gt;&lt;P&gt;2. 'applymap' the region against the country whenever you load data from the respective QVD.&lt;/P&gt;&lt;P&gt;Initial SQL load need to require any conditional if in this case.&lt;/P&gt;&lt;P&gt;--Arun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Oct 2009 14:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-or-use-variable/m-p/218562#M504995</guid>
      <dc:creator />
      <dc:date>2009-10-17T14:37:16Z</dc:date>
    </item>
    <item>
      <title>Nested IF or use variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-IF-or-use-variable/m-p/218563#M504996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Arun. I'll give this a try.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2009 22:34:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-IF-or-use-variable/m-p/218563#M504996</guid>
      <dc:creator />
      <dc:date>2009-10-19T22:34:25Z</dc:date>
    </item>
  </channel>
</rss>

