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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
yevhen_87
Frequent Visitor

Merging steps in Power Query

Is it possible to merge group by step with a previous step which is original table?

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Yes it is possible. All you need to do is refer to the previous step as your table name, and a column that exists in the source table as your matching column. So

 

ThisStep = Table.NestedJoin(GroupingStep, {"ColumnName"}, Source, {"OtherColumnName"}, "JoinColumnName", JoinKind.LeftOuter)

 

You can use any step in your query that returns a table, as a parameter in a table function, and there are lots of good reasons to do it.

 

--Nate

View solution in original post

Omid_Motamedise
Super User
Super User

Yes, it is possible, conside the next example

 

Omid_Motamedise_0-1730847651095.png

use the merge with the setting provided in the nex image (use the same table in left and right part)

 

Omid_Motamedise_1-1730847705893.png

 

this is resulting the following formula

 

= Table.NestedJoin(#"Added Custom", {"Date"}, #"Added Custom", {"Date"}, "Added Custom", JoinKind.LeftOuter)

 

replace #"Added Custom" with name of previous step (Index) and  if theire column name is different,  replace date in  {"Date"} with the name of the column in the Index step you want to use for merging.


If my answer helped solve your issue, please consider marking it as the accepted solution.

View solution in original post

3 REPLIES 3
Omid_Motamedise
Super User
Super User

Yes, it is possible, conside the next example

 

Omid_Motamedise_0-1730847651095.png

use the merge with the setting provided in the nex image (use the same table in left and right part)

 

Omid_Motamedise_1-1730847705893.png

 

this is resulting the following formula

 

= Table.NestedJoin(#"Added Custom", {"Date"}, #"Added Custom", {"Date"}, "Added Custom", JoinKind.LeftOuter)

 

replace #"Added Custom" with name of previous step (Index) and  if theire column name is different,  replace date in  {"Date"} with the name of the column in the Index step you want to use for merging.


If my answer helped solve your issue, please consider marking it as the accepted solution.
Anonymous
Not applicable

Yes it is possible. All you need to do is refer to the previous step as your table name, and a column that exists in the source table as your matching column. So

 

ThisStep = Table.NestedJoin(GroupingStep, {"ColumnName"}, Source, {"OtherColumnName"}, "JoinColumnName", JoinKind.LeftOuter)

 

You can use any step in your query that returns a table, as a parameter in a table function, and there are lots of good reasons to do it.

 

--Nate

uzuntasgokberk
Super User
Super User

Hello @yevhen_87 ,

 

İt is not possible in the same 1 query. But Yes, it is possible but in your Power Query you need 2 different query. You can duplicate your original query or reference(on previous step group by). Your second query needs to be added group by step and then merge 2 table.

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 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.