View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Deecrypt Deecrypt is offline
external usenet poster
 
Posts: 20
Default Using Calculated Item to add dynamic columns in pivot table

A related query,
Once I've created a Calculated Item (called Tri_Monthly), it accurately
gives me a total of 3 Month columns to the left of it. However, once a
4th month is added to the table as an additional column, it appears
away from the Tri_Monthly column.

How can I force the pivot table to add additional columns to the left
of the Tri_Monthly column on table refresh. That way my latest data
will fall within the boundaries of the afore mentioned formula.

=Month[-1]+Month[-2]+Month[-3]

Thank you kindly
Deecrypt


Deecrypt wrote:

Thank you Debra,
Worked like a charm. I had heard in a previous post to contact
yourself regrading advanced Pivot Table functions and that you are
releasing a book on it soon. May I contact you in the future with such
enquiries?

Cheers
Khurram

Debra Dalgleish wrote:

You can create a calculated item that will add the three items to its left:

Select the Month field button
On the PivotTable toolbar, choose PivotTableFormulasCalculated Item
Type a name for the formula
In the formula box, enter a formula that refers to the Month field, e.g.:

=Month[-1]+Month[-2]+Month[-3]

Click OK

Deecrypt wrote:
Hi all,
I have a pivot table that has a number of "Items" as rows fields (i.e
monitor, CPU etc) and "Month" fields for column (i.e January, February
etc) and the data is the count of each Item in a given Month. This
table is updated every month with a news months stats.

I need a custom column that would add the last three months count
together and display. I have no need of the Grand Total column but if
that can be used to achieve this, I would be happy. I managed to use a
"Calculated Field" to create the below formula:

='December 2006' +'November 2006' +'October 2006'

This works but only on existing data. Its does not change when a new
column is added. Can anyone show me how the above code can be changed
to only show the sum of the last three months entries?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html