Pivot Table Question

W

WhytheQ

I have a pivot table that looks a bit like this

Month
Measure Jul-06 Aug-06 Sep-06
Income 20 30 40

Each month the data table that the pivot is based on has another
month's worth of data added i.e for the above example the income for
Oct-06 will be added.

The problem is that in the above pivot I have manually gone into the
Month field and deselected 'All' and then selected 'Jul-06', 'Aug-06',
'Sep-06', so next month when October is added to the data the above
pivot will be unchanged i.e Oct-06 won't appear: what I want is a pivot
where only the most recent three months in the data field Month appear
in the pivot - is this possible without code??

Rgds
J
 
D

Debra Dalgleish

You could add a field to the source data, to calculate if the record
should be shown in the pivot table. For example, with dates in column A:

=AND(A2>=StartDate,A2<=EndDate)

StartDate and EndDate are named ranges, where the date range could be
manually entered or calculated.

In the pivot table, add the new field to the Page area, and select TRUE
from its dropdown list.
 
W

WhytheQ

Thanks Debra: I've used your advice (and will probably use similar
logic a lot in the future)

J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top