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: 
helen_pip
Creator III
Creator III

Match function with 2 or more options

Hello

Could someone kindly help me write match statement, because my attempt below is not working

 

If

(Match(CCG_TREND, '2M','3R', '1K', '1J', '9M', '1V'), 'Hampshire') ,If(Match(CCG_TREND, '10X'), 'Southampton') as Test

I also want to incoporate another option which will be "Other"

Can anyone kindly help me write this

Thanks

Helen

1 Reply
Not applicable

Try this

if(Match(CCG_TREND, '2M','3R', '1K', '1J', '9M', '1V') > 0, 'Hampshire',

if(Match(CCG_TREND, '10x') > 0,'Southampton',

'Other'))

You dont need the second Match if you are only testing for 1 value, you could just have a simple If so somthing like this

if(Match(CCG_TREND, '2M','3R', '1K', '1J', '9M', '1V') > 0, 'Hampshire',

if(CCG_TREND = '10x', 'Southampton','Other'))