Your expression:
SELECT(
TestID List[Test ID],
IN(
[RG_Name],
SPLIT(
TestID List[ERG List],
","
)
)
)
My expression:
SELECT(
TestID List[Test ID],
IN(
[_THISROW].[RG_Name],
[ERG List]
)
)
You were very close, actually. Mine prefixes [RG_Name]
with [_THISROW].
, but it isn’t strictly needed in this case. The big difference is is the the list of values we’re comparing to.
In my case, the expression is using [ERG List]
, which refers to the ERG List column value of each row in the TestID List table. In your expression, you use SPLIT(TestID List[ERG List], ",")
, which first uses TestID List[ERG List]
to create a list of all ERG List column values in the TestID List table.
Since each ERG List column value is itself a list, and you’re creating a list from those, you’re creating a list of lists. SPLIT() “flattens” that list-of-lists into a single list of all the values in all of the component lists. Then you look to see if the RG Name value occurs in that list.
The problem here is that flattened list-of-lists includes the ERG List values from all rows in the TestID List table, which isn’t really what you want to check. You only want the current row’s ERG List values.
In effect, your expression answers the question, “does this RG Name occur in any ERG List?”, where mine answers the question, “does this RG Name occur in this row’s ERG List?”
See also: