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?
Dataset 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 a calculated column in the “EmpTable,” right-click on the dataset name and then select “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.