Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have a list of values loaded in a temp table from an excel file. I would like to pass these values to wildmatch function through a variable. Is this possible in Qlikview?
Thanks in advance.
e.g.
List of Values
ABC
DEF
GEH
I'd like to store these values in a variable and pass that variable (with a complete list) to wildmatch function.
SET vList = '*ABC*','*DEF*','*GEH*';
Wlidmatch(MyField, $(vList));
SET vList = '*ABC*','*DEF*','*GEH*';
Wlidmatch(MyField, $(vList));
Many Thanks Gysbert. This really helpful.
Can we move the list to excel and load the values from excel in to the variable please?
Yes. Load the list from excel and use the concat function to create a list:
temp:
LOAD concat( chr(39) & MyValue & chr(39) , ',') as List FROM ...excelfile...
LET vList = peek('List',-1,'temp');
DROP TABLE temp;
Thanks again Gysbert. Almost there - although chr(39) is returning double quotes instead of single quotes and this messes my wildmatch function. any ideas please?
That's not possible. Chr(39) will return a single quote. Chr(34) returns a double quote.
That's fine Gysbert. I have had some issues with my excel file. Thanks for your help.