Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I would like to add salary to main table by objects. Problem is that main table doesn't contain dates which are in second table.
When I merge queries I am getting duplicates. How fix my issue?
Solved! Go to Solution.
Hi @Analitika ,
Based on your description, I have creeated a simple sample:
Please try:
Choose merge queries as new:
Then select matching columns and choose inner as join kind:
Remove the columns that you don't need
Final output:
Here is the M code:
let
Source = Table.NestedJoin(Table, {"Object"}, #"Table (2)", {"Object"}, "Table (2)", JoinKind.Inner),
#"Expanded Table (2)" = Table.ExpandTableColumn(Source, "Table (2)", {"Object", "Date", "Salary"}, {"Table (2).Object", "Table (2).Date", "Table (2).Salary"}),
#"Sorted Rows" = Table.Sort(#"Expanded Table (2)",{{"Object", Order.Ascending}}),
#"Removed Columns" = Table.RemoveColumns(#"Sorted Rows",{"Table (2).Object"})
in
#"Removed Columns"
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Analitika ,
Based on your description, I have creeated a simple sample:
Please try:
Choose merge queries as new:
Then select matching columns and choose inner as join kind:
Remove the columns that you don't need
Final output:
Here is the M code:
let
Source = Table.NestedJoin(Table, {"Object"}, #"Table (2)", {"Object"}, "Table (2)", JoinKind.Inner),
#"Expanded Table (2)" = Table.ExpandTableColumn(Source, "Table (2)", {"Object", "Date", "Salary"}, {"Table (2).Object", "Table (2).Date", "Table (2).Salary"}),
#"Sorted Rows" = Table.Sort(#"Expanded Table (2)",{{"Object", Order.Ascending}}),
#"Removed Columns" = Table.RemoveColumns(#"Sorted Rows",{"Table (2).Object"})
in
#"Removed Columns"
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Analitika ,
Sorry for that the information you have provided is not making the problem clear to me. Can you please share more details to help us clarify your scenario?
Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Kind Regards,
Bubble
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
To do so, follow these steps:
From the left pane of Power Query Editor, select the query into which you want the other query to merge.
Select Merge Queries > Merge Queries from the Home tab on the ribbon.
Select State from the RetirementStats table, then select the StateCodes query.
Select OK.
Regards,
Will
Yes but then I am getting much duplicated data, that is an issue.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.