Need some help pivoting 2 different source data tables...

Guitarmageddon

Board Regular
Joined
Dec 22, 2014
Messages
161
So Ill try to keep this concise without meandering and confusing everyone. Im kind of new to power query/pivot so forgive me if Im making some elementary oversights.

I have two different source documents, which I've brought into this workbook and added to the data model, via power query. It is basically some sales data, one is for 2019, the other for 2020. So, as you can imagine, all 2019 months are populated so far, and all 2020 months have just some February data (we work on the NRF calendar so February is our first month fyi)

I have a master table that is basically a date lookup, although date is present on both of the data tables. Since you cant have many/many, I have a master date table that basically is date/month/week number etc.

Then I draw my relationship from that date master into the two data tables. I also follow this logic with a master store number table.

However what Im wondering is, when it comes to actually pulling in the sales data, you dont need to have a master table for any of those metrics, right? If I want lets say the sales from 2019, I physically pull the data from that 2019 table into the pivot. And likewise, when I want 2020, I do the same. There isnt a way to say "grab the column called 'sales' and figure it out"? Im hoping this makes sense.

or maybe Im just overthinking it and Im correct?
date.PNG
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi
Because you use Power BI you could make union both table to single one. Modeling/New Table.
Code:
Source = UNION('SOURCE_2019', 'SOURCE_2020')
To build relationship between that source union table and dimension tables. And have not a problem with creating measures for both tables.
Regards,
 
Upvote 0

Forum statistics

Threads
1,223,809
Messages
6,174,759
Members
452,581
Latest member
ruby9c

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