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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

if and else condition in tmap expression

Hi,
I need to use the below if and else condition in tmap expression.

IF ST_ABBR IN (‘CT’,’MA’,’ME’,’NH’,’RI’,’VT’)
   MOVE 'N'           TO SSI-OMB-TYPE (alpha 1 byte)
ELSE
   MOVE 'M'           TO SSI-OMB-TYPE (alpha 1 byte)

I'm using the below condition in tmap and please let me know if anything is wrong
zip_Denorm_unload.ST_ABBR==("CT","MA","ME","NH","RI","VT")?"N":"M"



Thanks,
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi yugandhar9,
I like to know type of ST_ABBR. Is it string.
If it is string then you can use following expression:
 row1.name.matches("val1 | val2 | val 3") ? "value1" :"value2";
Regards,
Amol  
Anonymous
Not applicable
Author

Thank you Amol!It worked
Anonymous
Not applicable
Author

Welcome..!!
Nice to see that solution worked for you.
Regards,
Amol.