How to use a list or array as filter condition?

Zsolt,

The IN formula can be of help here. https://coda.io/formulas#In

So, in this case, the formula for [Table 2].[Column 2] would be:

[Table 1].FILTER(IN([Column 1], thisRow.[Column 1].[Column 1])).[Column 2].Sum()

A couple of things to note:

  1. The first argument of the IN formula corresponds to [Table 1].[Column 1]
  2. thisRow in the second argument corresponds to the row in [Table 2], since the formula is on a column in [Table 2]
  3. thisRow.[Column 1].[Column 1] --> the second [Column 1] exists because thisRow.[Column 1] is a list of @ref to rows in [Table 1]. You are therefore de-referencing it to pull out the value of [Column 1] from that @ref.

Does that help?

Thanks,
Hari.

5 Likes