Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Comparing a Value from one table to a string in another table

Hi everyone,  I have the following situation: 1-) I have a table called 'Expense Category' as shown below: 2-) I have a second table with credit card statement called 'CreditCard':   ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    Please try like:

    = Table.AddColumn(#"Changed Type", "Category", each Table.SelectRows(#"Expense Category",(x)=>Text.Contains([Expense Detail],x[Detail],Comparer.OrdinalIgnoreCase))[Category]{0})

    and then repalce error.

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly -- How to provide sample data

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Bifinity_75, I tested your solution, and it worked great also. I've got two distinct solutions for the same issue. appreciated. thanks.