Forum Discussion
Comparing a Value from one table to a string in another table
- Anonymous3 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 TeamIf 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
- Anonymous3 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.
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
it worked nice Gao, thanks! one more question, in a case where there is no match between 'Expense Detail' and the 'Detail' column, how can I get 'Others' as a result for the Category instead of the error message shown below?
thanks!
Julio