View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
William Horton
 
Posts: n/a
Default Week/month/year rollovers with PivotTable

How is your source data laid out (what fields and what data do they contain)?
What are you considering to be a week (Mon - Sun, Sat - Fri, etc)? And when
should the first week of the year start on (1/1/year, first monday, etc)?

"Rayo K" wrote:

Hello,

I have a pivot table that summarizes production data on a monthly and weekly
basis. I have generated another table that uses the getpivotdata and displays
data for current month-to-date, previous month, week-to-date, previous week,
and each individual day of the current week. It works fine except for
instances where the week spans two months or two years.

I have solved the spanning two months by making a second Pivottable based on
the first that summarizes by WEEKNUM instead of month. However, the week
spanning two years is problematic (it seems I will be spared this Jan 1 but I
need a permanent solution). I thought of manually changing the year for
either the December days or the January days, but that will throw off the
Monthly calculation.

Any suggestions on how to resolve this.