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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jp_afc
Contributor II
Contributor II

Formula help - check against another table to see if matches

I have a main table with list of IDs that have brands and clothing items field, which are calculated using if and applymaps. I also have another table with just a list of brands and clothing items. Each brand can have multiple clothing items.

I need a formula in the data load editor under the main table that checks if the the clothing items have been listed under the correct brands.

Ive done a formula in excel =IF(COUNTIFS(Clothing!A:A,Main!B2,Clothing!B:B,Main!C2)>0,"Match","No Match")

where Clothing!A:A = Brand names, Clothing!B:B = clothing items, Main!B2 = Brand name column and Main!C2 = Clothing items 

Labels (4)
1 Reply
hic
Former Employee
Former Employee

I would use Applymap(). For example:

CorrectMapping:
Mapping Load ClothingItem, Brand
From TableWithCorrectEntries;

Data:
Load ClothingItem, Brand, If(Brand=ApplyMap('CorrectMapping',ClothingItem),1,0) as IsCorrect
From TableWithEntriesThatShouldBeTested;