Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
biemello19
Contributor
Contributor

Wildmatch with a list

Hy Guys, 

I have 2 tables:
Table A: Contains some description about a lot of products like this:
Description
Blablablablabla Apple blablablabla
Blablabla Amazon blablablabla 
...(a lot of lines)...

Table 2: With a column that contains codes like Apple, Amazon... (Filters) 

So I need that these field from table 2 filter in description on table 1. The filter needs to have Apple, Amazon, and give to me the descriptions that contais these filters.

I think that I could use wildmatch (description, HERE IS MY DOUBT), I need that these codes on table 2 filter the description. I did the link table with table 1 and table 2. 

With best regards,

Gabriel 

Labels (1)
1 Reply
SerhanKaraer
Creator III
Creator III

Hi Gabriel,

You are right, you can do it with wildmatch.

First you have to unite your Table 2 brands as to be used in wildmatch.

tBrandsList:
LOAD Concat(chr(39) & '*' & Brands & '*' & chr(39),',') as BrandsList Resident table2;

// Assuming your field name is Brands in table 2

LET vBrands=Peek('BrandsList',0);

Then you can filter Table 1 with your wildmatch.

LOAD * Resident table1 WHERE WildMatch(Description,$(vBrands));

Another way to meet your needs is to split your Table1 with subfield into rows and then flag your records with applymap. I guess this method will be faster if your data is huge in volume.

Regards,