Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
Also, try using * instead of %
=If(AuthenticatedUser like 'US*','AMERICA',
If(AuthenticatedUser like 'EM*','EMEA',
If(AuthenticatedUser like 'AP*','AP','Without Region')))
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
Have you tried Match () or wildmatch () with pick ()?
Look here how to use pick () with MATCH ()
The match() Function | Qlikview Cookbook
Also, try using * instead of %
=If(AuthenticatedUser like 'US*','AMERICA',
If(AuthenticatedUser like 'EM*','EMEA',
If(AuthenticatedUser like 'AP*','AP','Without Region')))
Thank you I changed '%' to '*' and everything is working now.