Does not count occurrences in another table's relation column

Table 1 has a list of items in the first column.
Table 2 uses that list in a relation column, where I can select options.

When I try to count the occurrences in Table 2’s relation column from Table 1’s list of items, I get the total number of rows in the column or 0. This is the formula I’m using:

[Table 2].Filter([Table 2].[Relation-Col].contains(thisRow.Items)).Count()

Hi @Jana_Lumi and welcome to the Coda-Community,

can you please share your doc for better understanding?

Sincerely
Jannis

Hi Jannis,

Here is the link: https://coda.io/d/_d9TkZhx_sm4/Untitled-page_su844

Hi @Jana_Lumi,

please check if the following doc is your solution:

Sincerely
Jannis

I found a work around, but I think there is still a bug with the system. Because when I typed in the solution from scratch as a formula it did not work:

[Table 2].Filter([Table 2].[Relation-Col].contains(thisRow.Items)).Count()

But when I used Linked Relation to do this:

[Table 2].Filter([Table 2].[Relation-Col].contains(thisRow.Items))

I got the list of rows as expected.

Then tapped the formula button. All I needed to do after was add: .Count()

However, when I add .Count() I get an error message:

image

This was not a problem before.

You can see it here: https://coda.io/d/TroubleShooting_d9TkZhx_sm4/

You simply have to change the Column type from “relation” to “number” in order to solve this bug…




I hope that finally solves your issue.

Sincerely
Jannis

1 Like