Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jmialoundama
Specialist
Specialist

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
Sue_Macaluso
Community Manager
Community Manager

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

Sue Macaluso
sunny_talwar

What is the error message?

prasadmundewadi
Contributor III
Contributor III

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())))

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Instead of a nested if, how about using OR:

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

-Rob