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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

IF CONDITION

Hi Freinds

I have following condition in my data load script.But I do not get the expected results . There so many C_TYPES but all of them except defined below do not catagarise ito OTHERS catagory but shown seperately. Pls see whether condition is wrong if so correct me.

IF(C_TYPE='ST36','TOTAL_LOSS',IF(C_TYPE='ST06' OR C_TYPE='ST07' OR C_TYPE='ST08','LEGAL','OTHERS')) AS SET_CODE,

Labels (1)
1 Solution

Accepted Solutions
johnca
Specialist
Specialist

Hi Upali, this should give the results you seek...

IF(C_TYPE='ST36','TOTAL_LOSS',

     IF(C_TYPE='ST06','LEGAL',

          IF(C_TYPE='ST08','LEGAL',

          'OTHERS'))) AS SET_CODE

View solution in original post

2 Replies
johnca
Specialist
Specialist

Hi Upali, this should give the results you seek...

IF(C_TYPE='ST36','TOTAL_LOSS',

     IF(C_TYPE='ST06','LEGAL',

          IF(C_TYPE='ST08','LEGAL',

          'OTHERS'))) AS SET_CODE

upaliwije
Creator II
Creator II
Author

THANKS