Counting instances across tables

hey there!,
so i have a simple app that has 2 tables.
table 1 has the users add customers, columns are number, name, type (where type is an enumlist of lets say alpha / beta / theta)
Table 2 simply is meant to count how many alphas ,betas or thetas exist

using a virtual column in table 2 i am trying to get a formula that will count the number of times alpha is seen in table 1.

so far my approx formula looks like this:
count(select(table1[type], contains(split(table1[Type], โ€œ,โ€), table2[_THISROW].[Type])))

The problem being of course in the yes/no condition: the split of table1[type] gives me EVERY value in the entire column, so naturally the table 2 value im looking for is going to be in there somewhere, which means its always true, so it selects every single column.

i cant figure out how to make the formula to check just the value for EACH row in table 1 and compare it to see if it has the corresponding table2 value in it (alpha / beta / theta).

Even if i have a nice full list of all the values, i cant figure out a way to count the number of occurences of a specific value IN that list.

If anyone can help modify the formula or has another way of getting around the problem, i would be eternally grateful.

Solved Solved
0 4 538
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Try:

COUNT(
  FILTER(
    "table1",
    IN("alpha", [Type])
  )
)

See also:


View solution in original post

4 REPLIES 4
Top Labels in this Space