Pivot table formula for percentage?

samst

Board Regular
Joined
Feb 12, 2003
Messages
71
Hi

In my Pivot Table I pull data from 2 columns of a spreadsheet (Total Cost and Total Price) What I'm trying to do is have the Pivot table reflect the percentage difference but I keep getting #N/A as a result.
The spreadsheet also has a column for the percentage difference but when I include this column in the Pivot table it sums the percentages rather than giving me the acurate percentage for the grand total. I tried adding the Total price field twice and then making the second a "% of" with the Total Cost field as the Base but that just returns the #N/A eror. Anyone have any thoughts?

Thanks as always!!
 

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.
We would have an easier time assisting you if you provided some sample data, and precisely identified the needed calculation.
 
Upvote 0
Thanks for the reply. I'll simplify the example here, but basically

My spreadsheet looks like this
A B C D E
1 NAME Status Total Cost Total Price % Difference
2 X Complete $5 $10 50% (B2-A2)/B2)
3 Y In Progress $25 $30 16%
etc...



My Pivot Table looks like this:

Project Status Total Cost Total Price %Diff
X Complete 5 10 50
Y In Progress 25 30 16

GRAND TOTAL 30 40 66%

I can't figure out how to make the Grand Total % accurate. I don't want it to add up the percentages I want it to give me the percent of the Grand total difference between cost and price.
Thanks again!!
 
Upvote 0
Use a Calculated Field defined as...

=('Total Price'-'Total Cost')/'Total Price'

...and formatted as 0% to get...
Book1
CDEFGHIJKL
1TotalCostTotalPrice%DifferenceData
2$5$1050%NAMEStatusSumofTotalCostSumofTotalPrice%Difference
3$25$3017%XComplete51050%
4YIn_Progress253017%
5GrandTotal304025%
6
7
8
Sheet3
 
Upvote 0
Thanks!!
Sorry, but Can you tell me how I do that? or where I put it? I understand the formula I jest don't know where to put it in the pivot table
 
Upvote 0
With the 'Data' PivotTable button selected choose the Insert | Calculated Field... menu command.
 
Upvote 0
HI

I have excel 2007. Please show how you would work out the % in the same way, as I tried it, and on the individual cell the data is correct but on the grand total line it shows it as zero and does not apply the formula.

I used the formula

=SUM('MAY 2009 H&B'/'MAY 2008 H&B'*100-100)

=sum(33,296,271 / 46,852,649 *100-100)

Result should be -29, but it shows zero

Please help
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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