Forum Discussion
Comparing two columns with addresses
I'm trying to compare two columns. Each column has the address. I'm trying to create another column that says True or False if the two columns match or not. The issue that I'm having is if the address is the same, but one of them is missing anything or doesn't look exactly like the other one, the column says false. In reality, they are the same. I've also attached a picture of an excel file that shows how I get the results in power bi. Column C says False but the two addresses are the same, they just don't look exactly the same. So I want column C to say True even if they are not exactly the same.
ā
moatazbelah
You can add a custom column as follows= Text.Contains([address 1],[address 2],Comparer.OrdinalIgnoreCase) or Text.Contains([address 2],[address 1],Comparer.OrdinalIgnoreCase)
2 Replies
- FowmySuper User
moatazbelah
You can add a custom column as follows= Text.Contains([address 1],[address 2],Comparer.OrdinalIgnoreCase) or Text.Contains([address 2],[address 1],Comparer.OrdinalIgnoreCase) - v-zhangtiCommunity Support
Hi, moatazbelah
You can try to solve the problem with Dax.
Column = IF(LEFT([address 1],5)=LEFT([address 2],5),"True","False")LEFT: https://docs.microsoft.com/dax/left-function-dax
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.