Pivot Table Calculations return #NAME? error on data table changes--BUT ONLY for formulas based on an immediately preceding formula

Stepjack

New Member
Joined
Dec 19, 2014
Messages
9
OK; I hope someone can help with this, because I've built some pretty in-depth reports based on large data sets, and building 60 formulas. Data is updated monthly and the number of rows changes each time. I use an OFFSET formula to capture everything to avoid having to manually reselect data each month. My formulas are fine here. The problem occurs when I try to add a column, which I need to do on occasion. Even though the OFFSET formula works to capture all columns, it destroys SOME of my calculated formulas. As new columnar data is always added to the end, it does not change the order of the previous column fields on which the formulas are based.

After some digging, and recreting in a small test file, I've discovered that the ONLY formulas that 'break' causing ALL component fields of the calculation (both base data and calcs) to be replaced by '#NAME?' are those where the calculation includes a calculation IMMEDIATELY preceding it in the 'Solve Order'

AS AN EXAMPLE:
ItemDollarsDollar ChgUnitsUnit Chg
UPC 1100-10505
UPC 2200207010

<tbody>
</tbody><colgroup><col span="2"><col><col span="2"></colgroup>

Here is the resulting pivot table with calculations created--base data are the first four columns of data. The following formulas are all basic, so I'll just call out that 'Avg Prc % Chg' is based on the division of 'Avg Prc' and the immediately-preceding 'Avg Prc LY'. Also, I have repeated this exact calculation where it does not immediately follow a component calculation--the result is the same.
DATACalculations
Row Labels$$ Chg Units Unit ChgAvg PriceAvg Prc LYAvg Prc % ChgPric ChgAvg Prc % Chg 2
UPC 1$100-$10505$2.00$2.44-18%-$0.44-18%
UPC 2$200$207010$2.86$3.00-5%-$0.14-5%
Grand Total$300$1012015$2.50$2.76-9%-$0.26-9%

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>

NOW, I EXPAND TO ADD A COLUMN:
ItemDollarsDollar ChgUnitsUnit ChgBrand
UPC 1100-10505Brand A
UPC 2200207010Brand A

<tbody>
</tbody><colgroup><col span="2"><col><col span="3"></colgroup>

RESULT: The calculated field 'Avg Prc % Chg' immediately following one of its component calculations 'breaks', while the one not immediately following in the 'solve order' is fine.

DATACalculations
Row Labels$$ Chg Units Unit ChgAvg PriceAvg Prc LYAvg Prc % ChgPric ChgAvg Prc % Chg 2
UPC 1$100-$10505$2.00$2.44#NAME?-$0.44-18%
UPC 2$200$207010$2.86$3.00#NAME?-$0.14-5%
Grand Total$300$1012015$2.50$2.76#NAME?-$0.26-9%

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col><col><col><col></colgroup>


As I've said, I have 60 formulas, and many pivot tables replicated into many tabs in various formats, so rebuilding the entire file would be sub-optimal.
Is there a way to simply change the solve order? Any other ideas?

thanks,
Steve
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
As I am still unable to find a way to change the 'solve order' for calculated fields (only for calculated lists), my workaround solution was to delete those calc fields related to an immediately-prior calc field and re-add them to the end. Only 11 of my 60 formulas needed to be moved. This worked, but I had to rebuild a couple other formulas that contained a deleted/re-added field. And I had to re-add the fields into the pivot table. Not elegant, but functional. Now when I add a column, the calculated fields are not replaced with #NAME? and still function fine.

I'd still love to hear if someone has a better solution, or if Microsoft has a fix for this bug.

thanks,
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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