Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
The syntax underlying the "In" function is incorrect. I need help correcting the "In" Function. The attached files provide the supporting documents. Here's the script containing the "In function:
LOAD *, if([Policy Type]='U','STB',if([Policy Type] in ('B','S'),'FRM',if(isnull([Profession Descr]),'NEW',[Profession Flag]))) as Profession
Try with Match()
If([Policy Type]='U','STB',
If(Match([Policy Type], 'B', 'S'), 'FRM',
If(IsNull([Profession Descr]), 'NEW', [Profession Flag]))) as Profession
I just replaced the "In" Function with the "Or" Function and the syntax works. I guess the "In" function is not used in Qlikview, but I'm not sure.
LOAD *, if([Policy Type]='U','STB',if([Policy Type] = 'B' or 'S','FRM',if(isnull([Profession Descr]),'NEW',[Profession Flag]))) as Profession
Try with Match()
If([Policy Type]='U','STB',
If(Match([Policy Type], 'B', 'S'), 'FRM',
If(IsNull([Profession Descr]), 'NEW', [Profession Flag]))) as Profession
Thanks again Sunny, I was not familiar with the Match function. I guess there is more than one method here, I can use the "Or" function as well, correct (see my prior reply) ? Your syntax works perfectly !!
Yes you can. Or will work like this
If([Policy Type]='U','STB',
If([Policy Type] = 'B' or [Policy Type] = 'S'), 'FRM',
If(IsNull([Profession Descr]), 'NEW', [Profession Flag]))) as Profession
Thanks again Sunny !