current month and YTD

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?
 
D

Duane Hookom

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

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