Pivot Table with Calculations

Graemea

Board Regular
Joined
Oct 30, 2015
Messages
119
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have data arranged as in A1:F11 and would like to be able to summarise the results calculated in C14:F17 by using a Pivot Table rather than formulae.

Is it possible to achieve this with a Pivot Table?

If so could someone kindly please show me how.

Thanks!



Book1
ABCDEF
1SECURITYASSET TYPEABS TYPEWEIGHTRETURNCONTRIBUTION
2AAAABSCLO1.71-1.64-0.03
3BBBABSCLO0.89-0.560.00
4CCCABSCLO3.753.160.12
5DDDABSRMBS1.53-1.64-0.03
6EEEABSRMBS2.820.650.02
7FFFABSRMBS3.81-4.57-0.17
8GGGABSRMBSn/an/an/a
9HHHABSABS OTHER2.73-1.86-0.05
10IIIABSABS OTHER3.64-4.24-0.15
11JJJABSABS OTHER1.41-3.04-0.04
12
13
14ABS OTHER34.89-3.19-1.11
15CLO28.511.350.38
16RMBS36.61-2.22-0.81
17100.00-1.54-1.54
Data
Cell Formulas
RangeFormula
F14=D14/100*E14
F15=D15/100*E15
F16=D16/100*E16
F17=SUM(F14:F16)
D14=SUMIFS($D$2:$D$11,$C$2:$C$11,$C14)/SUMIFS($D$2:$D$11,$B$2:$B$11,"ABS")*100
D15=SUMIFS($D$2:$D$11,$C$2:$C$11,$C15)/SUMIFS($D$2:$D$11,$B$2:$B$11,"ABS")*100
D16=SUMIFS($D$2:$D$11,$C$2:$C$11,$C16)/SUMIFS($D$2:$D$11,$B$2:$B$11,"ABS")*100
D17=SUM(D14:D16)
E17=SUMPRODUCT(D14:D16/100,E14:E16)
E14{=SUMPRODUCT(IFERROR(($C$2:$C$11=$C14)*($D$2:$D$11)*($E$2:$E$11),""))/SUMPRODUCT(IFERROR(($C$2:$C$11=$C14)*($D$2:$D$11),""))}
E15{=SUMPRODUCT(IFERROR(($C$2:$C$11=$C15)*($D$2:$D$11)*($E$2:$E$11),""))/SUMPRODUCT(IFERROR(($C$2:$C$11=$C15)*($D$2:$D$11),""))}
E16{=SUMPRODUCT(IFERROR(($C$2:$C$11=$C16)*($D$2:$D$11)*($E$2:$E$11),""))/SUMPRODUCT(IFERROR(($C$2:$C$11=$C16)*($D$2:$D$11),""))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
You can do it but its a little fiddly and will need an additional column/s in the source data. The first column is pretty simple. Use SUM of Weight and then Show Values as percentage of column total. The 2nd is going to need a helper column in the source data of Weight*Return. You can then do a calculated field of that column divided by weight. The next column you dont say how that is formulated.
 
Upvote 0

Forum statistics

Threads
1,215,707
Messages
6,126,353
Members
449,311
Latest member
accessbob

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