Multiple value lookup

Hi,

I have an expression where based on the logged in userโ€™s team name, a slice will return a subset of data from my main table. I went with an assumption that 1 user has 1 team, but now have a use case where a user wants to see multiple team allocations. Can anyone suggest an edit to the formula below, please?

Iโ€™m looking to return the rows where the user could have 2 x โ€œTeam Nameโ€ listed in the Users table, i.e., Team A , Team B

AND([Portfolio Status]= โ€œActiveโ€ ,
[team name] = LOOKUP( USEREMAIL() , โ€œUsersโ€ , โ€œUseremailโ€ , โ€œTeam Nameโ€ ))

Solved Solved
0 10 255
1 ACCEPTED SOLUTION

Oh , I am sorry, my bad of an in advertently inserted incorrect operator in the expression

Please try
AND([Portfolio Status]= โ€œActiveโ€ ,
IN([Team Name], SELECT(Users [Team Name] , [Useremail] =USEREMAIL())))

View solution in original post

10 REPLIES 10

Maybe

AND([Portfolio Status]= โ€œActiveโ€ ,
IN([Team Name] = SELECT(Users [Team Name] , [Useremail] =USEREMAIL())))

Thanks, @Suvrutt_Gurjar

Error:
Cannot compare Ref with List in ([Team Name] = SELECT(Users[Team Name],([Useremail] = USEREMAIL())))

Could you mention, in which table is the [Team Name] as key column, Users or where the slice is based on?
And type of [Team Name] columns in bot the tables

The slice is based upon table โ€˜New Legal Obligationsโ€™
Within this table [Team Name] is Enum of type Ref to lookup table โ€˜Teamsโ€™

Within Table โ€˜Teamsโ€™, column [Team Name] is of column type โ€˜Nameโ€™

And [Team Name] is key within table Teams

Could you please share the final expression screenshot and the error as in the first post.

Any specific reason, you added a parenthesis before [Useremail] in the above expression?

No reason I added the extra parenthesis, maybe just poor coding.

Actually that extra parenthesis is just showing in the error, not in the actual expression

Oh , I am sorry, my bad of an in advertently inserted incorrect operator in the expression

Please try
AND([Portfolio Status]= โ€œActiveโ€ ,
IN([Team Name], SELECT(Users [Team Name] , [Useremail] =USEREMAIL())))

Spot on! Thanks so much, @Suvrutt_Gurjar

You are welcome @Colin_Lough

I am sorry that my one inadvertent and unintended placement of an equality opertor caused the post thread to get extended. Otherwise, the post thread need not have extended beyond post 2. I am sorry , however also happy now that it finally works per requirement.

Top Labels in this Space