Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

IF WildMatch not working

Hi Guys,

Why is the third condition not working?

if(wildMatch(service, '1', '2', '3'), 'condition_1',
if(wildMatch(service, '4','5','6','7','8'),'Con_2',
if(wildMatch(service, '*'),'Con_3'))) as Test

 

 

What I want is 

Field with 3 options

Condition_1

Con _2

Con_3

 

Condition_1 shows = 1,2,3

Con_2 = shows 4,5,6,7,8 

Con_3  = shows 1,2,3,4,5,6,7,8

 

Thanks

 

8 Replies
Nicole-Smith

Your third if statement can just be the else:
if(wildMatch(service, '1', '2', '3'), 'condition_1',
if(wildMatch(service, '4','Other','5','6','7','8'),'Con_2', ,'Con_3')) as Test

Without knowing what "isn't working", it's hard to determine what the issue is.  If you need further help, you will need to explain/give an example of what it is doing vs what you expect it to be doing.

D19PAL
Creator II
Creator II
Author

Thanks but that didn't work.

What I want is 

Field with 3 options

Condition_1

Con _2

Con_3

 

Condition_1 shows = 1,2,3

Con_2 = shows 4,5,6,7,8 

Con_3  = shows 1,2,3,4,5,6,7,8

Nicole-Smith

Condition 3 can never happen because everything fits into either Condition 1 or Condition 2.  As soon as it hits a true statement, it stops processing the nested ifs.

D19PAL
Creator II
Creator II
Author

Ok, what other way can I do this.

D19PAL
Creator II
Creator II
Author

Anyone?

Nicole-Smith

I don't understand why you want to see condition 3 when everything falls into condition 1 or 2.  

D19PAL
Creator II
Creator II
Author

Obviously 1,2,3,etc is dummy data.

Say condition one is UK

And condition two is USA

I need the option to see UK, USA and both together (I know they can click on both, bet it's better if it's a separate option) possibly in qlikview but not in qlik sense 😞 

 

 

Nicole-Smith

Your ask is vague so I still don't fully understand, but I think you might want to look into the concat() function which will allow you to show a list of things.

Concat function: https://help.qlik.com/en-US/sense/April2020/Subsystems/Hub/Content/Sense_Hub/Scripting/StringAggrega... 

Community Guidance: https://community.qlik.com/t5/QlikView-App-Dev/How-to-get-answers-to-your-post/td-p/268841