2 Replies Latest reply: Oct 19, 2009 6:34 PM by Steve Mock RSS

    Nested IF or use variable?

      I'm a newbie. Currently I am using nested IFs in a LOAD statement. Something like this:

      LOAD Region,

      IF (Region='UK','Europe',

      IF (Region='Germany','Europe',

      IF (Region='France','Europe, Region) AS WWRegion,

      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:

      SET EUCountries = {'UK','Germany','France'};

      LOAD Region

      IF (Region=EUCountries,'Europe',Region) AS WWRegion,

      Is this something that can be done in a QlikView script? If so, what is the specific syntax?

      Any help is appreciated. Thanks!