Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Like % expression?

Hi,

I am trying to create an expression in a multibox, the idea is that if the user start with US, MX, CAN, BRA, HON, GUA, exc. should be America, if it's JAP, CHN, etc should be APJ. I am using something like:

=If (AuthenticatedUser like 'US%','AMERICA',
If (AuthenticatedUser like 'EM%','EMEA',
If (AuthenticatedUser like 'AP%','AP','Without Region')))

But this is not working, all records are now on Without Region.



What can I do to have them grouped correctly?

1 Solution

Accepted Solutions
sunny_talwar

Also, try using * instead of %

=If(AuthenticatedUser like 'US*','AMERICA',
If(AuthenticatedUser like 'EM*','EMEA',
If(AuthenticatedUser like 'AP*','AP','Without Region')))

View solution in original post

4 Replies
sunny_talwar

I would suggest you to create a new field in the script with and then use that as your multibox field

If(AuthenticatedUser like 'US%','AMERICA',
If(AuthenticatedUser like 'EM%','EMEA',
If(AuthenticatedUser like 'AP%','AP','Without Region'))) as NewField

vinieme12
Champion III
Champion III

Have you tried Match () or wildmatch () with pick ()?

Look here how to use pick () with MATCH ()

The match() Function | Qlikview Cookbook

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sunny_talwar

Also, try using * instead of %

=If(AuthenticatedUser like 'US*','AMERICA',
If(AuthenticatedUser like 'EM*','EMEA',
If(AuthenticatedUser like 'AP*','AP','Without Region')))

Anonymous
Not applicable
Author

Thank you I changed '%' to '*' and everything is working now.