Issue with relating tables in PowerPivot

I am fairly new to PowerPivot in Excel and I was wondering about how you could use two tables of unrelated data in a pivot table.  I understand about how you can relate two tables like Customer and CustomerOrder that share a common key, but what about something like this:

Claims Table:
Claim Number
Claim Type
Year of Loss
State
County
Zip Code

Population Table:
Population Count
Year of Census
State
County
Zip Code

There isn't a true key that connects these Tables but they have many fields in common.  So if I was to list Florida Hurricane claims by loss year in a Pivot table is there any way to also list the Population for Florida for the same years?  Is there a solution that would automatically switch if I changed from State = Florida to County = DUVAL?  Could this be done with a DAX expression?
aaronzwProgrammerAsked:
Who is Participating?
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You must add a Calendar table into the Data Model. The calendar table should contain all the possible dates and a column called Year with the year part of the dates and then you can link Year field of the Calendar table with both of your tables with their respective Year fields.
And while creating the pivot table, you must drag the Year field from your calendar table into the rows area and insert the slicers for State and County or page filters and filter the pivot table based on your criteria.
0
 
abbas abdullaCommented:
Hi,

To make it easier can you share sample of the data or mocked up data?
0
 
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Chosen answer would resolve the issue based on details provided in the description.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.