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: 
RyugaHideki
Contributor III
Contributor III

Count instances of values of a table in another table

Hello 

Say we have a table of vegetables that i created something that has values like TABLE A  "potato","tomato","onion"
and another tables that has repeated instances of these very values TABLE B like a survey for example where it shows what every customer bought i want to count the instances of each value of table A in TABLE B how can i do that 

I need this cause i want to create a dimension of it so i could display them individually or filter them 

Labels (1)
1 Solution

Accepted Solutions
RyugaHideki
Contributor III
Contributor III
Author

I actually found a solution 

Count(If(WildMatch(TableA, TableB), TableA))

for those who want to know  and for the dummy data it's something like this 
Table:

load* inline[

"Carrot",

"Broccoli",

"Spinach"]; the other table is just instances of these values like repeated 

View solution in original post

3 Replies
Kushal_Chawda

@RyugaHideki  What exactly you want to count? Could you please share example with dummy data?

RyugaHideki
Contributor III
Contributor III
Author

I actually found a solution 

Count(If(WildMatch(TableA, TableB), TableA))

for those who want to know  and for the dummy data it's something like this 
Table:

load* inline[

"Carrot",

"Broccoli",

"Spinach"]; the other table is just instances of these values like repeated 

seanbruton

Superb !!! Neat Solution.