Hi all. I'm going a bit crazy with this so I'm really hoping someone can help. I have two tables and I'm trying to run an if statement that uses both.
I have a table of values in Table2 and the source data in Table1. I want the if statement to run through on every row of Table1 and check each row of Table2 to return a value if the conditions are met. The else is just to show any nonstandard cases.
I'm either missing something about using a list, or it can't be done. Below is what I have in the query but I just get an error stating that the >= can't be used with a list. I'm sure there's a simple answer, and that answer might be that it can't be done and I have to join the tables but I have to do this with a very long list and 5 different tables so I'm trying to avoid joining them.
Please help!?
#"new column" = Table.AddColumn(
#"previous step",
"New Column",
each
if (#"previous step"[Col1] >= Table2[Min] and #"previous step"[Col1] < Table2[Max])
then Table2[Value]
else 55
)