Forum Discussion
RandomKitten
7 years agoFrequent Visitor
Match one column OR another to a different table
Basically, I have a table with data in two columns that I need to match to another table. The problem is, I need to conditionally match this table to another based on whether a column has data. T...
v-cherch-msft
Microsoft Employee
7 years agoHi RandomKitten
You may try to add a column in table1 to check if it match or not.
Column =
IF (
Table1[Device Code] <> BLANK (),
IF (
Table1[Device Code] IN VALUES ( Table2[Code] )
|| Table1[Device Name] IN VALUES ( Table2[Product] ),
"Match",
"Not match"
)
)
Regards,
RandomKitten
7 years agoFrequent Visitor
Thank you, v-cherch-msft. However, the point of this is not to confirm whether a match exists, but to build a table relationship based on the match. I apologize if I was unclear on this.
Creating a "Match/No Match" column will not give me the link I need to establish a relationship to the other table so I can pull device information based on the product.
- v-cherch-msft7 years ago
Microsoft Employee
Hi RandomKitten
You may link the two columns and try to use USERELATIONSHIP Function.Please have a look at below article.
Reference:https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
Regards,