current month and YTD

  • Thread starter Thread starter Kirk P
  • Start date Start date
K

Kirk P

I'm trying to create a report that displays sales data for
the current month and YTD on one report. The query which
the report is based contains all the detail information,
and I have a parameter set up to prompt for the month and
year in question.

However, I cannot get the report to work correctly. Once
you are prompted for the month, the report will only
display information for the month (YTD is wrong). Any
ideas?
 
I would use a couple calculated columns. Assuming a date field of [ADate]
and a field to sum [ANum] create columns:
MTDANum: Abs( Sum(Year([ADate]) = [Enter Year] AND Month([ADate]) = [Enter
Month] * [ANum]))
YTDANum: Abs( Sum(Year([ADate]) = [Enter Year] * [ANum]))
 
Back
Top