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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Filter table based on another table value

Hello,

I have the following "Reference" table loaded in Power Query.

 

Student NameTo submit as fromSubmission optional (Yes/No)
Lizui02 July 2022No
Laufenburg Yes
Tegalpapak29 August 2022No
Ar Rabiyah  
Bellegarde02 July 2022 
Gangarampur No
Luntas05 May 2022Yes
Frei Paulo10 August 2022Yes
Seedorf03 July 2022No
Cosamaloapan de Carpio10 September 2022No

 

Below is the "Submissions" table.

 

Student Name
Lizui
Laufenburg
Ar Rabiyah
Bellegarde
Gangarampur
Luntas
Seedorf

 

I am trying to create a new table that would filter out names in the "Submissions" table if the corresponding name in the "Reference" table in column "Submission optional (Yes/No)" is "Yes". 

 

The "Results" table should be as below.

 

Student Name
Lizui
Ar Rabiyah
Bellegarde
Gangarampur
Seedorf

 

Any help is much appreciated!

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Here is the code for 3rd table named Results. See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test 

let
    Source = Table.NestedJoin(Submissions, {"Student Name"}, Reference, {"Student Name"}, "Reference", JoinKind.LeftOuter),
    #"Expanded Reference" = Table.ExpandTableColumn(Source, "Reference", {"Submission optional (Yes/No)"}, {"Submission optional (Yes/No)"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded Reference", each ([#"Submission optional (Yes/No)"] <> "Yes")),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Submission optional (Yes/No)"})
in
    #"Removed Columns"

 

View solution in original post

1 REPLY 1
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

Here is the code for 3rd table named Results. See the working here - Open a blank query - Home - Advanced Editor - Remove everything from there and paste the below code to test 

let
    Source = Table.NestedJoin(Submissions, {"Student Name"}, Reference, {"Student Name"}, "Reference", JoinKind.LeftOuter),
    #"Expanded Reference" = Table.ExpandTableColumn(Source, "Reference", {"Submission optional (Yes/No)"}, {"Submission optional (Yes/No)"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded Reference", each ([#"Submission optional (Yes/No)"] <> "Yes")),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Submission optional (Yes/No)"})
in
    #"Removed Columns"

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.