Discussion board where members can get started with QlikView.
I currently have the following within my script to load a qvd file :
if(CT_YEAR = 'C', 2010, if(CT_YEAR = 'L', 2009)) as [ACYear],
I'd like to cater for another option 'N' :
if CT_YEAR = 'C' then ACYear = '2010'elseif CT_YEAR = 'L' then ACYear='2009'elseif CT_YEAR = 'N' then ACYear ='2011'endif
Can anyone advise how to set this up within the load script?
Go to Solution.
if(CT_YEAR = 'C','2010',if(CT_YEAR = 'L','2009',if(CT_YEAR = 'N','2011'))) as ACYear,
please try the above script .
9999 is the catchall error
I may be missing somehting but the way I'd do the above is:
=if(CT_YEAR = 'C','2010',if(CT_YEAR = 'L','2009',if(CT_YEAR = 'N','2011','Outside Range'))) as ACYear,
Just like a running IF expression in Excel.
Alternatively look into using a Mapping load and 'Apply Map' in the script.
Hope that helps,
Matt - Visual Analytics Ltd
I tried the solution given by priyadashin and it worked fine. Thanks to everyone who replied.