Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

If Condition

Dear Friends

In my load script I have following line which does not execute

if(POL_TYPE='F' AND IsNull(LAST_PERIOD),'N',IF(POL_TYPE='F' AND (LEN(TRIM(LAST_PERIOD)))>0,'R',if(POL_TYPE='A','R',POL_TYPE)))AS POL_TYPE,

Pls see and advise me whether it is wrong. My requirement is as follows

If POL_TYPE='F' and LAST_PERIOD is null POL_TYPE should be 'N'

If POL_TYPE='F' and LAST_PERIOD is not null POL_TYPE should be 'R'

If POL_TYPE='A'  POL_TYPE should be 'R'

for other records POL_TYPE=POL_TYPE as recorded in the data table

11 Replies
upaliwije
Creator II
Creator II
Author

Yes

but not working

anbu1984
Master III
Master III

What is the error message?