Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
psk180590
Creator III
Creator III

If and Match in Script

Hello All,

I'm looking to have multiple match conditions in my script.

Ex:  if(match(FNum,'140','150','160','170') and Match(ANum,'*'),1,0)as Absolut_N

The First Match works fine but, the second with * doesn't work. Please, help me on how to include  * in a Match condition.

Regards
Sai.

12 Replies
Chanty4u
MVP
MVP

try like this

If(Match([FNum],'140','150','160','170') and Match([Anum],'*'), 'Fnum', Anum)

jwjackso
Specialist III
Specialist III

If(Match(FNum,'140') and Match(ANum,Chr(42)),1,0) as Absolut_N;

wdchristensen
Specialist
Specialist

Might want to verify that [Anum] is not null. The * matches non-null values.

psk180590
Creator III
Creator III
Author

Both the solutions don't work for me. They give 0 as result

PrashantSangle

Can you be more specific with Anum with *

what are you trying to do??

can you explain with sample file??

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Peter_Cammaert
Partner - Champion III
Partner - Champion III

First things first: what is it that you want to test? And what does your data look like?

jwjackso
Specialist III
Specialist III

What are the possible values for Anum?

Chanty4u
MVP
MVP

may be


if(match(FNum,'140','150','160','170') ,'Yes',if(Match(ANum,'*'),'No',''))  as   Newfield

wdchristensen
Specialist
Specialist

If(Match([FNum],'140','150','160','170'), If(Match([Anum],'*', 1, 0)), -1) as Absolut_N