Forum Discussion

kb177's avatar
kb177
Helper II
2 years ago

List.contains on multiple columns

Hello 

 

Is there any way to use list.contains for multiple columns ? I'm trying to get location details under one column 

I have list of users locatated in various locations but there are 2 location columns and of of the column has location

User  loc1  loc2

A       NY

B               DC

 I have created a LIST seperately and referenced it 

Tried : if list.contains(LIST,loc1)= true then loc1 else if list.contains(LIST,loc2)=true then loc2 else "Check"

with this i'm only getting loc1 details and where location is under loc2 i'm getting check

 

current output   column                            Expected output column

A   NY                                                        A  NY

B  Check location                                       B   DC

 

 

1 Reply

  • kb177 Try this, add a custom column in PQ

    if (if [Loc1] = "" then [Loc2] else [Loc1]) = "" then "Check" else (if [Loc1] = "" then [Loc2] else [Loc1])