sum total for report date range

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.
 
M

Marshall Barton

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))
 
L

Larry Linson

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
 
G

Guest

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))
 

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