How to create a Pivot table with 2 many-to-many relationship tables

Xceller

Active Member
Joined
Aug 24, 2009
Messages
265
I have two tables, [ActualSales] and [ActualPayment].

They are both have 3 columns,
[ActualSales] contains: "Date", "InvoiceNo", "SalesAmount"
[ActualPayment] contains: "Date", InvoiceNo", PaymentAmount"

I tried building a linked Date table and a linked Invoice table and hoping to connect and two tables.
[lnkDate]
[lnkInvoiceNo]

I dropped the Date field from the [LinkedDate] table to the Row Field of the pivot table and the InvoiceNo from [LinkedInvoice] table to the pivot table row field. Also dropped the ActualSales from [ActualSales] table and PaymentAmount from the [ActualPayment] table to the Value field of the pivot table.

Although the Grand Totals of the pivot table are correct, the invoice by dates are incorrect - repeating the same amounts.

Is my dataset un-pivotable? is there a workaround?

This is the result I am hoping to see:

InvoiceDate------------InvoiceNo------------ActualSalesAmount-----------------PaymentDate-----------PaymentAmount
05/30/2018-----------10001-----------------$1,000.00----------------------------6/30/2018--------------$1,000.00

any help or comments will be appreciated.
 
Last edited:

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Looks like the dimension table you created is not filtering the two fact tables. Did you link them with relationships? are the invoice numbers on both tables related?
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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