Pivottable, Calculated Field,

JasL

Board Regular
Joined
Dec 16, 2002
Messages
79
I'm having problems with calculated fields in Excel 2010 when adding columns to the data source. Adding columns results in calculated fields becoming corrupt!

Datasource
DataRep DataSales DataCOS

Tom £300.00 £150.00
Deek £200.00 £100.00
Harry £100.00 £50.00

Calculated Fields
Solve Order Field Formula

1 Margin£ =DataSales+DataCOS
2 Margin% ='Margin£' /DataSales

Pivot
Row Labels Sum of DataSales Sum of DataCOS Margin £s Margin %
Deek 200.00 100.00 300.00 150.00%
Harry 100.00 50.00 150.00 150.00%
Tom 300.00 150.00 450.00 150.00%
Grand Total 600.00 300.00 900.00 150.00%

Note that the calculated field names have been amended in the pivot. I believe this is relevant.

If I add a new field to the data like this:
DataRep DataSales New1 DataCOS
Tom £300.00 New (150.00)
Deek £200.00 New (100.00)
Harry £100.00 New (50.00)

and refresh, the calculated field all show #NAME? in the pivot table.

The calculated field become:
Calculated Field
Solve Order Field Formula
1 Margin£ =#NAME?+#NAME?
2 Margin% =#NAME? /#NAME?

I'm developing reporting that uses multiple calculated field. The reports are evolving that means new fields will be required which will result in #NAME? errors for all the calculated fields in multiple pivot tables!

I've been using Excel & VBA for 20+ years and consider myself as a bit of a geek. I can normally find solutions to my Excel issues but this one is driving me mad!!!!!

Can anybody please help? My sanity depends on it.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi, glad the code worked for you (y)

I never got to the bottom of the issue, so would also be interested to see if anyone else has.
 
Upvote 0

Forum statistics

Threads
1,216,058
Messages
6,128,538
Members
449,456
Latest member
SammMcCandless

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