Qlik Community

Community Corner

Discussion board for questions about the Qlik Community Platform as well as general discussions and even some fun. This is for both new and longtime community members. Everyone is welcome!

Announcements
Join us on May 23rd, Q&A with Qlik - Developer Series, Customizing Extensions: Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
jmialoundama
Creator III
Creator III

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

Instead of a nested if, how about using OR:

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

-Rob