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: 
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
psk180590
Creator III
Creator III
Author

Thanks all for the suggestions.

Basically, for the above mentioned FNum there has to be a ANum selected it can be 10,20,30...100.

Here, i'm looking to generate a field where the FNum is as mentioned above and the ANum can be any slected number.

Digvijay_Singh

I think you should use wildmatch for wildcards, may be like this -

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

psk180590
Creator III
Creator III
Author

The suggestions above work for me, but just a curious question: Can we not use '=' in script as in SetAnalysis

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


When i use this is the script, it gives me an Error : Field "*" Not Found.