I have 2 tables that I'm joining with an Excel Power Query Merge. I have an Hours table and a Parts table. I'm using a Left Outer join on Task_ID to keep all rows from the Hours table and add the matching rows from the Parts table. This is fine and pulls in the Part No. and Cost from the Parts table but because my common field (Task_ID) is not unique I'm getting duplicate rows which is expected but I don't want to duplicate values in the Sum of Hours column (created from an earlier join using an aggregate function).
Is my desired output even possible or is there a better way altogether to go about this?
I want for example to get a Sum of Hours per Week per Task and a Total Cost per Week per Task
Hours
| Week | Task_ID | Sum of Hours |
| ---- |-------- |------------- |
| 01 | ABC#1 | 1 |
| 01 | ABC#2 | 3 |
| 02 | ABC#2 | 3 |
Parts
| Task_ID | Part No. | Cost |
| ------- | -------- | ---- |
| ABC#1 | 111 | 10 |
| ABC#1 | 222 | 20 |
| ABC#2 | 111 | 10 |
| ABC#2 | 333 | 30 |
| ABC#2 | 444 | 40 |
Desired Output
| Week | Task_ID | Sum of Hours | Part No. | Cost |
| ---- | ------- | ------------ | -------- | ---- |
| 01 | ABC#1 | 1 | 111 | 10 |
| 01 | ABC#1 | null | 222 | 20 |
| 01 | ABC#2 | 3 | 111 | 10 |
| 01 | ABC#2 | null | 222 | 20 |
| 01 | ABC#2 | null | 333 | 30 |
| 02 | ABC#2 | 3 | 111 | 10 |
| 02 | ABC#2 | null | 222 | 20 |
| 02 | ABC#2 | null | 333 | 30 |