PowerPivot Sum Using Relationship

chaserracer83

New Member
Joined
Oct 8, 2012
Messages
27
Hello there,

I haven't used PowerPivot in two years and I am having a hard time with what should be a simple task...

I have two tables and I have connected them with a key. One table has a unique key for each record, one table can have several records for a single key. I am trying to add a calculated column in the table with the unique keys, that shows the sum of a column form the other table where the keys match.

I actually thought this happened automatically using the SUM function once relationships were setup, but SUM is just showing the total for all records in the other table. I've tried using CALCULATE(SUM($ column from many table),Key from many table = key from single table) and that doesn't work either.

Does anyone know what I'm doing wrong? I've searched all over.

Thank you,
Chase
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi
If you have a relation between your tables it is not required to write a filter statement in CALCULATE. For AdventureWorks traditional database where is exists relation between dimCustomer table and factSales table it will be a calculated column (sum for each customer) in dimCustomer with
Code:
=CALCULATE(SUM('factSale'[SaleAmount]))
Regards,
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

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