Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
45 |