Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

IF with Mixmatch and And ......

Hi!

I dont seem to have the desired result...Help! This is what i want to do IF location is 'AC' AND 'CA' and source is 'S' then CODE

IF(TRIM(MIXMATCH(location,'AS','CA')) AND TRIM(Source) = 'S','S') AS CODE;

2 Replies
Gysbert_Wassenaar

I don't think location can't have two values in the same record. So 'AC' AND 'CA' is not possible. If you want 'AC' or 'CA' then MIXMATCH(location,'AS','CA') won't work as AS is not AC. Try MIXMATCH(location,'AC','CA') instead. And possibly you want MIXMATCH(TRIM(location),'AC','CA') instead of putting the trim on the outside.


talk is cheap, supply exceeds demand
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this

If(MixMatch(Trim(location),'AS','CA') AND Trim(Source) = 'S', CODE) AS CODE

Hope this helps you.

Regards,

Jagan.