How count Tags number from another table

I have several tags in a row in one of my tables and I want to count the number of these tags in another table, I used the following formula to count them but it does not work properly:


I mean such a table:

Hi @amin_jebeli
and welcome to the Coda Community! :handshake:

Your formula is almost OK… You are trying to compare a text with a row reference.

You have two ways to make it work:

  1. Make the tags column in Table 1 a lookup to the Table 2 table rather than a select list (recommended)
  2. You add the column tags lists of Table 2 in the formula:
    [Table 1].[tags].ListCombine().Filter(CurrentValue.Contains(thisRow.[tags lists])).Count()

I hope this helps.

I’d suggest to change the post to the “Ask the Community” category.
Usually “How To” and “Doc Show and Tell” are to explain some ideas or solutions.

Thank you!

Thank you Federico
The formula you submitted did not work, in fact I have a main table from which I also made 7 different views per person, I want to count the tags registered per person.
The example I created is actually the same Hats table that was created per person, and in another table I want to count the number of tags registered for that person per line.

Hello @amin_jebeli

try this one (based on your shared example):
Table.Filter(tags.Contains(thisRow.[tags list])).Count()

Though I still warmly recommend the first approach.

I have the feeling we are dealing with different data.

This is the copy of your document and I see the correct number of occurrences in the formula column (with that formula)

Please, let me know if we are pointing to the same direction.

I explain my problem in this link: