Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

Search the same occurrence in another table by ID

Hello!
I have two tables that follow this structure:
Table1

ID   Type  
1    A
2    C
3    B
4    C


Table2

ID   Type  
1    A
1    B
2    B
2    A
3    C


I want to create a column in Table1 that will check if the corresponding ID in Table2 has the Type column value in at least one of the corresponding rows and report "Yes" or "No". The expected result would be something like this

Table1

IDType    Match    
1    A    Yes
2    C    No
3    B    Yes
4    C    No
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

why 3B is Yes? should that be NO?

you can try below DAX

Column =
VAR _check=maxx(FILTER(Table2,'Table2'[ID]=Table1[ID]&&Table2[   Type  ]=Table1[   Type  ]),Table2[ID])
return if(ISBLANK(_check),"No","Yes")




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
ryan_mayu
Super User
Super User

@Anonymous 

why 3B is Yes? should that be NO?

you can try below DAX

Column =
VAR _check=maxx(FILTER(Table2,'Table2'[ID]=Table1[ID]&&Table2[   Type  ]=Table1[   Type  ]),Table2[ID])
return if(ISBLANK(_check),"No","Yes")




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.