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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

script to combine field output to new field

Code is a field that can equal any of the below numbers in the parenthesis. I want to combine them in my load statement and have the output be the number 5 if the code is equal to any of the listed codes.

however, the script I'm using is not working...

CODE in(100 , 101 , 103 , 105 , 106 , 108 , 110 , 111 , 113 , 115, 546 , 549 , 551 , 554) AS FIVE,

any suggestions?

1 Reply
pat_agen
Specialist
Specialist

hi,

use the following

if(match(CODE,100 ,101 ,103 ,105 ,106 ,108 ,110 ,111 ,113 ,115,546 ,549 ,551 ,554)>0,5) AS CodeInList

the field CodeInList will have the value 5 if the Code is in your list