Merged Query Issue

mdmilner

Well-known Member
Joined
Apr 30, 2003
Messages
1,365
Merged queries do not seem to be doing what I'd expect.
What I want are all dates within a given date range and then when I have matching values in the second table, it populates those columns (left outer)
What I'm getting are results that would match an inner join.

BaselineDates is just a single column date table which in this case has 31 values (1/1/2025 -> 1/31/2025).
I'm curious what I'm missing.

let
Source = Excel.CurrentWorkbook(){[Name="Table4"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"BaselineDates", type date}}),
#"Merged Queries" = Table.NestedJoin(#"Changed Type", {"BaselineDates"}, #"EIS OT DATA", {"Overtime Date"}, "EIS OT DATA", JoinKind.RightOuter),
#"Expanded EIS OT DATA" = Table.ExpandTableColumn(#"Merged Queries", "EIS OT DATA", {"EMP NO", "Hours Counted"}, {"EMP NO", "Hours Counted"}),
#"Grouped Rows" = Table.Group(#"Expanded EIS OT DATA", {"BaselineDates", "EMP NO"}, {{"SumOT", each List.Sum([Hours Counted]), type nullable number}})
in
#"Grouped Rows"
 
Hi,

Try this
#"Merged Queries" = Table.NestedJoin(#"Changed Type", {"BaselineDates"}, #"EIS OT DATA", {"Overtime Date"}, "EIS OT DATA", JoinKind.LeftOuter),
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top