Qlik Community

Community Corner

Discussion board for questions about the Qlik Community, its features, sharing information, general discussions and even some fun. This is for both new and longtime community members. Everyone is welcome!

Announcements
Attend QlikWorld 2020 and hear keynote speaker, Malcolm Gladwell. Register by February 29th to save $200. Learn More
Highlighted
jmialoundama
Contributor II

mutiple wilmatch and simple if

Hi, 

I have a a colonne with differents code to exclude the next code:

  • CODE  > 401231
  • CODE finish by '5*'
  • CODE finish by '5A*
  • Code don't begin by '603*'

I test this code, but i have errors : 

if(WildMatch(CODE,'*5','*5A'),CODE,
     if(Not WildMatch(CODE,'*603*'),CODE,NULL())
         if (CODE > 401231,CODE)
)

 

Thanks in advance

 

Labels (2)
4 Replies
Highlighted
Community Manager
Community Manager

Re: mutiple wilmatch and simple if

@jmialoundama Are you using QikView or Sense?  I would like to move this into the correct product forum. 

Sue Macaluso
Highlighted

Re: mutiple wilmatch and simple if

What is the error message?

Highlighted
prasadmundewadi
New Contributor III

Re: mutiple wilmatch and simple if

You IF syntax is incorrect:

if(WildMatch(CODE,'*5','*5A'),CODE,
     if(Not WildMatch(CODE,'*603*'),CODE,NULL())
         if (CODE > 401231,CODE)
)

Here is the right syntax (you might want to rearrange the NULL() but basically it is syntax error):

if (WildMatch(CODE,'*5','*5A'),CODE,
   if(Not WildMatch(CODE,'*603*'),CODE,
      if (CODE> 401231,CODE,NULL())))

Highlighted
MVP & Luminary
MVP & Luminary

Re: mutiple wilmatch and simple if

Instead of a nested if, how about using OR:

If(WildMatch(CODE,'*5','*5A')
or (Not WildMatch(CODE,'*603*')
or CODE > 401231
,CODE)

-Rob