Zip codes in PowerPivot

Misca

Well-known Member
Joined
Aug 12, 2009
Messages
1,760
Office Version
  1. 365
Platform
  1. Windows
I'm a PowerPivot newbie and I have a feeling this should be really easy but I still can't figure this out in PowerPivot:

I have a table with shipments data. Each shipment has two zip codes, one for origin and one for destination. I also have another table for zip codes with names, terminals etc.

My problem is I can't figure out how could I use just one zip code table for both origin and destination and how can I separate the origin and destination relations from one another?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
PowerPivot will allow you to create 2 relationships between the 2 tables... but only 1 can be "active" at a time. You will have to use the function USERELATIONSHIP to "reactivate".

OriginMeasure :=CALCULATE([SomeMeasure], USERELATIONSHIP(Facts[OriginZip], Zip[Zipcode]))
DestMeasure :=CALCULATE([SomeMeasure], USERELATIONSHIP(Facts[DestZip], Zip[Zipcode]))
 
Upvote 0
Thanks!

That was just what I was looking for!
 
Upvote 0

Forum statistics

Threads
1,224,045
Messages
6,176,063
Members
452,703
Latest member
kinnowboxes

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