Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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.