Forum Discussion
Arial12
7 years agoFrequent Visitor
Case like statements - Compare two table columns
Hi Experts,
I have two table with similar column that i want to compare and calculate a column.
something like this,
if tabl1.col1 = tabl2.col1 then "yes" else "NO"
any suggestion?
Thanks,
12 Replies
- AnonymousNot applicable
Merge the tables into a new one in Power Query, then you can easily achieve what you want.
- v-yulgu-msftMicrosoft Employee
Hi Arial12,
Based on my assumption, there existing a common field between two tables, which can determine the matching relationship between tables, right? And you want to compare the col1 in both tables, right? If so, please try below formula to create a calculated column.
New column = IF ( tab1[col1] = LOOKUPVALUE ( tab2[col1], tab2[matchingcolumn], tab1[matchingcolumn] ), "Yes", "No" )Best regards,
Yuliana Gu