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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

find non matching rows in two tables with many to one relationship

i have two tables below Table1 and Table 2 with 1:many relationship on Table 1[Column1] and Table 2[Column1].

I want to find rows that are in Table 1  but not in Table 2  and vice versa based on join on [Column1].

If drag all columns from both tables and select 'show items with no data' it gives me all records but i want to filter them based on my desired criteria. I want to do this without using Merge. 

So i want below result

 

rows in Table 1 but not in Table 2

 

Column1   Column2

5                  dff

 

 rows in Table 2 but not in Table 1

 

Column1    Column2

7                  ds

7                  ffd

8                  fdf

8                  ffd

 

 

Table 1

Column1       Column2

1abc
2dff
3ddd
4sss
5dff
6erf

 

Table 2

Column1        Column2

1gjj
1fgf
2df
2fg
3ss
3ffg
4sdds
4gfgf
6ds
6dd
7ds
7ffd
8fdf
8ffd
1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous 

 

Try these Measures as Visual Filters for tables 1 and 2 respectively
See attached file as well

 

Measure =
IF (
    NOT ( CONTAINS ( Table2, Table2[Column1], SELECTEDVALUE ( Table1[Column1] ) ) ),
    1
)

 

Measure 2 =
IF (
    NOT ( CONTAINS ( Table1, Table1[Column1], SELECTEDVALUE ( Table2[Column1] ) ) ),
    1
)

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

Hi @Anonymous 

 

Try these Measures as Visual Filters for tables 1 and 2 respectively
See attached file as well

 

Measure =
IF (
    NOT ( CONTAINS ( Table2, Table2[Column1], SELECTEDVALUE ( Table1[Column1] ) ) ),
    1
)

 

Measure 2 =
IF (
    NOT ( CONTAINS ( Table1, Table1[Column1], SELECTEDVALUE ( Table2[Column1] ) ) ),
    1
)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors