Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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,
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
Merge the tables into a new one in Power Query, then you can easily achieve what you want.
can't merge them. both are very large tables
Try creating a relationship between the tables and then use a function like:
isequal = IF(Table[Column1]=RELATED(Table2[Column1]),"yes","no")
Hope this helps!
Tables don't have a relationship.
As far as I know, you will have to create a relationship between the tables in order to compare between them. This may require creating an extra column on each of them to use as a link.
Then how do you know which values to compare?
Each table has a column with a matching value with each other..
Each table has a column with a matching value with each other..
Is there a reason that you cannot create a relationship based on those columns?
yes, one is only Numeric and another one allows alph numeric values as well.
Convert the numeric column to text and create a relationship between the two. If you need to run calculations off the column that then can use the VALUE function or create a duplicate column using a numeric data type.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |