SELECT expression

Hi,

 

I have a main table with an expression in a VC to return a list of email addresses if a value in the main table (District) column appears in another table, possibly more than once.

The second table has user emails ([User Id]and each user Id has an enumlist column with Districts in associated with it.

Main table has a column Called District and the value for the first row is "Bravo".

I need the expression to return hilary@listersbrewery.com, sari@listersbrewery.com phil@listersbrewery.com bonnie@listersbrewery.com 

as they all have bravo in their [Districts] column

 

Second table is called Second Table

User IdDistricts
hilary@listersbrewery.com
Bravo , Bravo2 , Hotel , November , November2 , India , Papa , Tango , Tango2 , Victor , Whiskey
sari@listersbrewery.com
Alpha , Alpha2 , Bravo , Charlie , Charlie2 , Delta , Delta2 , November , Oscar , Oscar2 , Sierra , Sierra2 , Tango
cathy@listersbrewery.comHotel
phil@listersbrewery.comAlpha , Bravo
ali@listersbrewery.comFoxtrot
debbie@listersbrewery.com
Uniform , Uniform2 , XRay , XRay2 , Zulu , Zulu2 , Echo Foxtrot , Echo Foxtrot2 , Foxtrot Golf , Foxtrot Golf2
bonnie@listersbrewery.comBravo
rozalinde@listersbrewery.com0

 

below is the expression that I can't get to work.

SELECT(Second Table[User Id], IN(District ],SPLIT(LIST([Districts]), ",")))

 

Thanks

Phil

 

 

0 5 79
5 REPLIES 5

FILTER(
  Second Table,
  IN(
    [_THISROW].[DISTRICT],
    [DISTRICT]
  )
)

Thank you - that works and give the correct UNIQUE ID - how do I get the coresponding User ID values?

 

Thanks

This is the table structure

Unique IdUser IdDistricts
9E3F3C3Bhilary@listersbrewery.com
Bravo , Bravo2 , Hotel , November , November2 , India , Papa , Tango , Tango2 , Victor , Whiskey
D57BEAE8sari@listersbrewery.com
Alpha , Alpha2 , Bravo , Charlie , Charlie2 , Delta , Delta2 , November , Oscar , Oscar2 , Sierra , Sierra2 , Tango
C0F51F56cathy@listersbrewery.comHotel
848C2D06phil@listersbrewery.comAlpha , Bravo
A9FF6999ali@listersbrewery.comFoxtrot
62AAC76Ddebbie@listersbrewery.com
Uniform , Uniform2 , XRay , XRay2 , Zulu , Zulu2 , Echo Foxtrot , Echo Foxtrot2 , Foxtrot Golf , Foxtrot Golf2
80F40C32bonnie@listersbrewery.comBravo
rozalinde@listersbrewery.com
  

 

This Works

SELECT(Second Table[User Id], IN([Unique Id],


FILTER(
User Assign Alpha,
IN(
[_THISROW].[District ],
[Districts]
)
)))

 

That makes little sense to me but, in this case:

SELECT(
  Second Table[User Id],
  IN(
    [_THISROW].[DISTRICT],
    [DISTRICT]
  )
)
Top Labels in this Space