Forum Discussion

SDHaas's avatar
SDHaas
Frequent Visitor
4 years ago
Solved

Return the first matching value from range using List

Hello.   I have two tables ('Assignment', 'Type'). I'm trying to search a range in the first table and return the first match from the second table. I'm currently using "List.ContainsAny" and retur...
  • Jakinta's avatar
    4 years ago

    You can add this step in Assignment query.

     

    = Table.AddColumn( PreviousStepName, "TYPE", each let x=List.Skip(Record.ToList(_),2), y=Record.ToList(_){1}, z=Table.Column(Type, y) in try List.RemoveNulls (List.Intersect( { x,z} )){0} otherwise "")