sum total for report date range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like for my report to calculate the totals for each column based on
the date range parameters entered, but instead I'm getting the cumlative
total for each column. I've set up similar reports in the past, but I can't
remember what I did to make it work. The formula that I'm using to total
each column is "Total Traffic:=(sum([Community Traffic]))". The information
will be listed as report footer if that matters.
 
Dcbrown428 said:
I would like for my report to calculate the totals for each column based on
the date range parameters entered, but instead I'm getting the cumlative
total for each column. I've set up similar reports in the past, but I can't
remember what I did to make it work. The formula that I'm using to total
each column is "Total Traffic:=(sum([Community Traffic]))". The information
will be listed as report footer if that matters.


Although I have no idea what date range you are talking
about, you can conditionally sum a column using this kind of
thing:

=Sum(IIf([date field] Between [start date] And [end date],
[Community Traffic], 0))
 
Marshall Barton said:
Dcbrown428 said:
I would like for my report to calculate the totals for each column based
on
the date range parameters entered, but instead I'm getting the cumlative
total for each column. I've set up similar reports in the past, but I
can't
remember what I did to make it work. The formula that I'm using to total
each column is "Total Traffic:=(sum([Community Traffic]))". The
information
will be listed as report footer if that matters.


Although I have no idea what date range you are talking
about, you can conditionally sum a column using this kind of
thing:

=Sum(IIf([date field] Between [start date] And [end date],
[Community Traffic], 0))

I was a bit puzzled by that, too. If the = Sum(... is in the Footer, it
will apply to the values in the Group (if a Group Footer) or the entire
Report (if in the Report Footer). Perhaps the latter is what the OP means by
"cumulative total."

When I limit by dates, I tend to do it such that only the selected dates are
in the RecordSource of the report, so no "extraneous" dated records are
available to interfere.

Larry Linson
Microsoft Access MVP
 
Thank you! That solved my problem.

Marshall Barton said:
Dcbrown428 said:
I would like for my report to calculate the totals for each column based on
the date range parameters entered, but instead I'm getting the cumlative
total for each column. I've set up similar reports in the past, but I can't
remember what I did to make it work. The formula that I'm using to total
each column is "Total Traffic:=(sum([Community Traffic]))". The information
will be listed as report footer if that matters.


Although I have no idea what date range you are talking
about, you can conditionally sum a column using this kind of
thing:

=Sum(IIf([date field] Between [start date] And [end date],
[Community Traffic], 0))
 
Back
Top