1 Reply Latest reply on Jul 28, 2011 9:22 AM by philmodjunk

    Subsummary by week

    AnnetteSteinberg

      Title

      Subsummary by week

      Post

      Hello,

      I've looked at several posts for this issue, and nothing seems to address the issue (well, I can't find it).

      I would like a report to show records for each month (based on a date field mm/dd/yy) and then subsummarize by week (Monday through Sunday). 

      Thanks for your help. 

        • 1. Re: Subsummary by week
          philmodjunk

          To get the sub summary to work, you'll need to sort on a value that all records from the same week have in common. Here's a calculation you can put in a calculation field that returns the date for Sunday of the same week the date falls in:

          YourDateField - DayOfWeek ( YourDateField ) + 1

          Let's say you call this field, cWeek.

          Then you can set up your sub summary part to use cWeek as its "sorted by" field and you then sort your records by cWeek to make the sub summary part (and its subtotals) appear.

          A similar calcultion can be used to group records by Month and this may also be useful to you:

          cMonth: YourDateField - Day ( YourDateField ) + 1

          It returns the date of the first day of the same month.

          Both of these calculations are tricks that I learned here from another forum poster: "Comment".