Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a list of values that I need to run the mixmatch function against. At the moment this isn't a problem as the list is static but this will change in the future. What I would like to do is store all possible values in an excel file and give the end user access to this file so that they can amend the list when required.
In this case, is it possible to run the mixmatch function against a table and if so, how is this done?
EXAMPLE
Current Function:
IF(MIXMATCH(Month, 'June', 'July', 'August'), 'Y', 'N') AS Summer
Desired Function:
IF(MIXMATCH(Month, [INSERT TABLE LOOKUP HERE]), 'Y', 'N') AS Summer
Thanks!
With the help of a variable it should be possible. Something like:
TmpLookup:
LOAD concat(chr(39) & Month & chr(39), ',') as LookUpList
FROM ...excel_file_here...;
LET vLookupList = peek('LookUpList');
DROP table TmpLookup;
Data:
LOAD ...some_fields...,
IF(MixMatch(Month, $(vLookUpList)), 'Y','N') as Summer
FROM ...source_here...;
With the help of a variable it should be possible. Something like:
TmpLookup:
LOAD concat(chr(39) & Month & chr(39), ',') as LookUpList
FROM ...excel_file_here...;
LET vLookupList = peek('LookUpList');
DROP table TmpLookup;
Data:
LOAD ...some_fields...,
IF(MixMatch(Month, $(vLookUpList)), 'Y','N') as Summer
FROM ...source_here...;
Excellent, thanks Gysbert, the solution worked perfectly!