Event attendance by group reference problem

I have a table of Members and a table of Sessions, the Sessions table contains the columns Group1Members and Group2Members which both contain a list of MemberID keys (EnumList) relating to the members who attended the session, per group.

What I am wanting and failing to achieve is a ref_rows type table in a members view listing sessions attended (regardless of group).

In the members table I have managed to get a list of related SessionID’s in a VC, but i can get a ref_rows type reference from this, it’s just a list, and I suspect i’m going about this in the wrong way? Any suggestions?

VC column expression in Members table:

LIST(
  FILTER(
    "Sessions",
    IN(
      [_THISROW].[MemberID],
      [Group1Members]
    )
  )
    + FILTER(
      "Sessions",
      IN(
        [_THISROW].[MemberID],
        [Group2Members]
      )
    )
)

Hi try this

• Add a new column Attendees and define it as an EnumList with Base Type = Ref pointing to Members.

• Expression for Attendees in the Sessions table: [Group1] + [Group2].

• Add a virtual column in Members: REF_ROWS(“Sessions”, “Attendees”).

Thanks for your help Gustavo, I tried that but i get the following error on the VC in Members. Any suggestions?

¿Has intentado simplificar tu consulta a lo siguiente?:

FILTER(
       "Sessions",
       OR(
          IN(
             [_THISROW].[MemberID],
             [Group1Members]
             ),
          IN(
             [_THISROW].[MemberID],
             [Group2Members]
             )
        )
1 Like

Thank you, appreciate the help. All working.

1 Like

You are welcome!