Merge two table by month in Power query

sailepaty

Active Member
Joined
Nov 1, 2005
Messages
279
Is there a way two merge two tables by month to obtain the expected output table?

Balances table:Manager table:Expected output table
LocJanFebMarLocJanFebMarManagerJanFebMar
623,9394,55214,4906JohnPaulPaulJohn59,76935,60447,973
46,8429,3573,2054MikePaulPaulMike31,73733,3734,709
1215,57324,1546,36112JohnPaulJohnPaul27,80271,56059,115
1816,7707,5185,83218JohnPaulJohn
104,62024,2965,49610MikeJohnJohn
2018,43610,80918,28420MikeMikePaul
23,48723,68022,7282JohnPaulJohn
1517,59911,3084,70915PaulJohnMike
91,8392,29923,1369MikePaulPaul
310,20322,5647,5563PaulMikeJohn

<tbody>
</tbody>


Thanks
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Yes, of course:

First you unpivot both tables, then join/merge? (sorry about the translaterion, use localized version) via Loc and UnpivotAttribute (month).
Then group by Manager and UnpivotAttribute: Sum on Amount (just ignore Loc here).
Pivot again on months - there you are :)
 
Upvote 0

Forum statistics

Threads
1,216,059
Messages
6,128,542
Members
449,457
Latest member
ncguzzo

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