Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hey all,
Currently I am having trouble with matching 2 columns (A and B) in 2 different tables (Table 1 and Table2). These columns have a Many-to-One relationship (Table1[A] to Table2[B] = n:1). I am trying to find out for all values in B if these exist in A (Outcome as provided in Table2[Exists in A?]).
What would this problem be solved in the easiest method?
MWE:
Table1
| Index | A | 
| 1 | This value  | 
| 2 | Another value | 
| 3 | This value | 
| 4 | Not this value | 
| 5 | This is a string | 
| 6 | Another value | 
Table2
| Index | B | Exists in A? | 
| 1 | This value | Yes | 
| 2 | Another value | Yes | 
| 3 | More values | No  | 
| 4 | This is a string | Yes | 
Solved! Go to Solution.
Hi @Anonymous ,
If you only want to campare column [A] and [B].
Best Regards,
Jay
Hi @Anonymous ,
If you only want to campare column [A] and [B].
Best Regards,
Jay
What's worth mentioning is,
your data model is a typically negative example to avoid, namely "referential integrity violation". Easy to google this jargon and enough solutions to it.
|                  Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!  | 
DAX is simple, but NOT EASY!  | 
Funny you would mention the "referential integrity violation" because what I am looking for in the real problem is actually a method to spot these violations and mark them such that these are easy to find and can be dealt with.
@Anonymous add this column:
Exist in A? = 
    IF(
        Table2[Value] IN CALCULATETABLE(VALUES(Table1[Value])),
        "Yes",
        "No"
    )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.