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
jamiers
Helper I
Helper I

Remove row if it matches row in another table

Hello All,

 

I have been searching this question, but I can't seem to get to the bottom of my solution.

 

If an item shows up in Table 1, I want it to be excluded in Table 2.

 

I have created a cell to match from Table 1 and Table 2.  In the end, when I pull up table 2, I want it to remove every row that shows up in the match cell in Table 1.

 

Table 1 - Has a field called "MatchCode"

Table 2 - Has a Field called "Code" - 

 

I want any row to be removed in table 2 where Code shows up in the Table 1 Match Code.

How would I do this in Power Query?

1 ACCEPTED SOLUTION

Insert this statement in GAP Promotions - Promotions Lis where Table 2 is !GAPCheck

 

= Table.SelectRows(Source, each not List.Contains(List.Buffer(Table2[#"Mem#/GAP"]),[#"Mem#/GAP"] ))

 

 

View solution in original post

5 REPLIES 5
wdx223_Daniel
Super User
Super User

NewStep=let a=List.Buffer(Table1[Match Code]) in Table.SelectRows(Table2,each not List.Contains(a,[Code]))

Vijay_A_Verma
Super User
Super User

Please post samples of Table1 and Table2 so that we can provide the solution.

Here is a link to a Excel Sheet with Table Data.

Table Data

 

If a row shows up in !GAPCheck [Mem#/GAP], I want to eliminate the row from GAP Promotions - Promotions Lis.

Insert this statement in GAP Promotions - Promotions Lis where Table 2 is !GAPCheck

 

= Table.SelectRows(Source, each not List.Contains(List.Buffer(Table2[#"Mem#/GAP"]),[#"Mem#/GAP"] ))

 

 

Thank you.  That did it.

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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 Kudoed Authors