Data is similar to below:
OLD_ZEND comes from table1 and NEW_ZEND comes from table2. Looking to create a measure that will compare the strings of OLD_ZEND and NEW_ZEND and if they are the same output Y else output N.
I think what you need is a calculated column in one of your tables.
Create an index
column in each table by right clicking table1
and select Edit Query
, the Query Editor
will be opened, in the Add Column
tab select Index Column - From 1
then press Close & Apply
. Do the same for the table2
.
Then create a new calculated column in the table2
, call it OLD_ZEND
and use this DAX expression:
OLD_ZEND =
IF (
[NEW_ZEND] = LOOKUPVALUE ( table1[OLD_ZEND], table1[Index], [Index] ),
"Y",
"N"
)
Now you have a new column in table2
with Y
or N
depending if OLD_ZEND
and NEW_ZEND
are equal.
Let me know if this helps.