In Power BI, how to check table 1 column values are exist in table 2 or not, when there is no relationship between both tables?
Data set format :
Check left table ID column values are exist in Right Table EmpId column or not, if exist then update flag value in Left table with 1 else 0.
Let’s start with an example:
Step-1: Create calculated column in EmpTable, right click to data set name then click to New column.
Step-2: Write Dax formula to check column values are exist or not
Flg = IF ( EmpTable[ID] IN DISTINCT ( ProductOrder[EmpId]), 1, 0 )
So here, we used three DAX functions:- IF, DISTINCT & IN.
DISTINCT: Returns unique Empid values from ProductOrder table.
IN: It will check “EmpTable” ID column values are exist or not in ProductOrder Table.
IF: If Id’s are matched it will return 1 else 0.
Hope you enjoyed the post. Your valuable feedback, question, or comments about this post are always welcome or you can leave us message on our contact form , we will revert to you asap.