Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
dmxmikey
Creator
Creator

how to create a variable script

I have below script and would like to output word Gluten, if its either C or  P or M

M2_Allergens:

left join (Allergy_tmp)

Load

[p-code],

/

if(Gluten='C' or 'P' or 'M','Gluten')  as M2_Allergens

Resident Allergy_tmp;

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Title looks like you need variable,

M2_Allergens:

left join (Allergy_tmp)

Load

[p-code],

/

if(Match(Gluten,'C' , 'P' , 'M'),'Gluten', Gluten)  as M2_Allergens

Resident Allergy_tmp;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

1 Reply
Anil_Babu_Samineni

Title looks like you need variable,

M2_Allergens:

left join (Allergy_tmp)

Load

[p-code],

/

if(Match(Gluten,'C' , 'P' , 'M'),'Gluten', Gluten)  as M2_Allergens

Resident Allergy_tmp;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful