Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
psk180590
Contributor 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.

Tags (1)
12 Replies
Highlighted
Chanty4u
Esteemed Contributor III

Re: If and Match in Script

try like this

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

Highlighted
jwjackso
Valued Contributor

Re: If and Match in Script

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

Highlighted
wdchristensen
Valued Contributor

Re: If and Match in Script

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

Highlighted
psk180590
Contributor III

Re: If and Match in Script

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

Highlighted

Re: If and Match in Script

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.
Highlighted

Re: If and Match in Script

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

Highlighted
jwjackso
Valued Contributor

Re: If and Match in Script

What are the possible values for Anum?

Highlighted
Chanty4u
Esteemed Contributor III

Re: If and Match in Script

may be


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

Highlighted
wdchristensen
Valued Contributor

Re: If and Match in Script

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