![]() |
Limit Dates in Pivot Table
I have a pivot table that I would like to limit to the previous weeks date
range. How can I code something that will filter out all dates other then the previous weeks? The pivot table structure will be rows of employees names, columns of Dates and a count of transactions. In an example for today, I would want a date range of 2/3 - 2/9. Then next week it would list 2/10 - 2/16. Thanks for the help. |
Limit Dates in Pivot Table
Greg, other than unselecting all dates and selecting only the ones you want,
the only way to do this is to add a helper column with a calculation to calculate weeks. Here's an example formula to add to your data set to give you a column listing the previous week in the format of MM/DD/YYYY: =TEXT(A1-7-(WEEKDAY(A1)-1),"MM/DD/YYYY") & " - " & TEXT(A1-WEEKDAY(A1),"MM/DD/YYYY") Be sure to remove all line breaks. Then add the new column as the page field in the pivot table and select the week that you want. Let me know if you need additional help. -- Charles Chickering "A good example is twice the value of good advice." "Greg H." wrote: I have a pivot table that I would like to limit to the previous weeks date range. How can I code something that will filter out all dates other then the previous weeks? The pivot table structure will be rows of employees names, columns of Dates and a count of transactions. In an example for today, I would want a date range of 2/3 - 2/9. Then next week it would list 2/10 - 2/16. Thanks for the help. |
All times are GMT +1. The time now is 02:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com