Statement to find where records are listed in another unrelated table

I have 2 tables that are related only by an ENUMLIST that points to the other table as a lookup

2X_8_88f64e26f8e9dd6d2d24a9467357feebb894e674.png

While @LeventK has provided an amazing solution here:

it just seems to me that there should be a really simple work-around to achieve this โ€œyellowโ€ column.

Solved Solved
0 3 617
1 ACCEPTED SOLUTION

@Riki_Armstrong
Have you tried with:

SELECT(House[House],IN([_THISROW].[Pets],[Pets]))

View solution in original post

3 REPLIES 3

@Riki_Armstrong
Have you tried with:

SELECT(House[House],IN([_THISROW].[Pets],[Pets]))

@Riki_Armstrong
Take a look at this pls.

This is brilliant, thank you. A very simple solution to link two tables with a reversible one to many link.

I named my example tables and key fields the same name which might be confusing to some so here is the solution assuming table structure:

Table House
Key field - House_name
EnumList link to Pets - Pets_owned

Table Pets
Key_field - Pets_type
This virtual column to reverse link the houses:

SELECT(House[House_name], IN([_THISROW].[Pets_type],[Pets_owned]))

In words:
The list of values of column โ€˜House_nameโ€™
โ€ฆfrom rows of table โ€˜Houseโ€™
โ€ฆwhere this condition is true: ((The value of โ€˜Pets_typeโ€™ from the row referenced by โ€˜pets_typeโ€™)
is one of the values in the list (The value of column โ€˜Pets_ownedโ€™))

Top Labels in this Space