Simple question on summing across table

Badrul

New Member
Joined
Sep 25, 2013
Messages
28
So I've managed to work this bit of it out on my own:
=CALCULATE(SUM(table2[Amount]),FILTER(table2,table2[IDField] = table1[IDField]))


This correctly sums up the amounts in table2 in to the categories I have defined in table 1:
Sales $10,000
COS: $5,000
etc.
However now I want to bring into play the "Period" field in table 1 so that I can construct something like:
2008 2009 2010
Sales 3,000 3,000 4,000
COS 1,500 1,500 2,000


I thought it would be simply a case of creating my formula shown above and the break down would then happen automatically when I drop in the period column. But instead the number just repeats itself. What is the best way of doing this? Ideally something where if I chose to break it down by some other field it could cope with that too.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Ok answered my own question -- I shouldn't be doing this in a calculated column; I should be creating a measure .. and here's the key bit, I should create it in the Powerpivot window underneath IDField column in table1.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,635
Members
452,661
Latest member
Nonhle

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