Forum Discussion

ragnezza's avatar
ragnezza
Frequent Visitor
1 year ago
Solved

List.Contains to Lookup for a value within the same table

Hello, I'm trying to come up with the M code to find if the value from one field is also in another field (equivalent of a VLOOKUP in Excel) within the same table. The table has two columns (A and B)...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Write it like

     

    if List.Contains(List.Buffer([PreviousStepName[Column B]), [Column A]) then "Yes" else "No"

     

    --Nate