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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

RELATED in Power Query

Hello,

 

I usually use DAX, not Query so I struggle with a problem.

Because I have big source files, I deleted a lot of lines by using Query before working on Dax.

However, one of my user told me that there are a few exception lines that I deleted which souldn't be eliminated. These lines can be easily identified by using RELATED with another table and adding a simple formula. However I cannot do that in DAX because there lines are already deleted in Query.

My question is : Is it possible to do a related in Power Query ? If yes, what is the code to add in the request.

 

Thank you.

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

If you're just needing to identify missing rows that should match with other tables, then you should do a merge in Power Query.

Select the table that contains the records that need to be matched, go to the Home tab > Merge Queries > Merge Queries as New.

In the dialog that opens, select the field from the first window that your tables are related on in the data model, then select your second table in the second window (the one that your RELATED function directs to), and select the corresponding field that this table is related on.

Start with using a LEFT OUTER join.

Once you hit ok, you will essentially have a single table that mimics the virtual table that is created when your tables have been related in the data model.

You should see blank rows on the right hand side of the join that don't match your left hand side table. Thse, presumably, will be the rows you need to reinstate.

 

You can experiment using RIGHT OUTER, FULL OUTER, LEFT/RIGHT ANTI joins in order to match up the tables in different ways, and manipulate which rows are displayed/removed during the join.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you BA_Pete for your help. I will try to use this solution for my problem.

BA_Pete
Super User
Super User

Hi @Anonymous ,

 

If you're just needing to identify missing rows that should match with other tables, then you should do a merge in Power Query.

Select the table that contains the records that need to be matched, go to the Home tab > Merge Queries > Merge Queries as New.

In the dialog that opens, select the field from the first window that your tables are related on in the data model, then select your second table in the second window (the one that your RELATED function directs to), and select the corresponding field that this table is related on.

Start with using a LEFT OUTER join.

Once you hit ok, you will essentially have a single table that mimics the virtual table that is created when your tables have been related in the data model.

You should see blank rows on the right hand side of the join that don't match your left hand side table. Thse, presumably, will be the rows you need to reinstate.

 

You can experiment using RIGHT OUTER, FULL OUTER, LEFT/RIGHT ANTI joins in order to match up the tables in different ways, and manipulate which rows are displayed/removed during the join.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.