Beginner question on Powerpivot relationships

Castello

New Member
Joined
Jan 28, 2015
Messages
2
Hi all,
I am new to powerpivot (and these forums), and would like to ask for little help regarding table relationships.


I have two tables, one that lists our projects. And another table that lists subprojects that are related to main projects.
Below you can see a (really simplified) example of the tables.


TableA: Projects


Project_id Subproject_id
1 A
2 B
3 C
4
5


TableB: Subprojects


Subproject_id Cost
A 5
B 3
C 3


I would like to create a measure that sums the costs of the subprojects on the project level.
Project cost:=Sum(Subprojects[Cost])


The problem is that some projects have no related subprojects, so when I try to create the relationship powerpivot automatically changes the direction of the relationship as it cannot create a 1-to-many relationship in the requested direction.

How should I set up the model in order to accomplish what I am trying to?

Thanks for your help!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I think you really need the projectID to be in the subprojects table, rather than putting the subprojectid into the projects table.
 
Upvote 0

Forum statistics

Threads
1,224,065
Messages
6,176,170
Members
452,710
Latest member
mrmatt36

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