this month and year to date side by side

  • Thread starter Thread starter Regulus
  • Start date Start date
R

Regulus

I need my report (which is done each month) to show the current months figure
as well as the year to date for each person.
for example:
Name | December | Year to date total
bob 12 123
mark 5 72
steve 31 412

I have created queries and reports that will do just one of those but not
that will show both the desired month and the year to date total for each
person. Thanks for any help
 
It would help if you provide some table and field names. However, you can
create a totals query with SQL like:
SELECT [EmployeeName],
Sum(Abs(Format([DateField],"yyyymm")=Format(Date(),"yyyymm")) * {Figure
Field}) as MTD, Sum(Abs(Format([DateField],"yyyy")=Format(Date(),"yyyy")) *
{Figure Field}) as YTD
FROM tblNoNameGiven
GROUP BY [EmployeeName];
 
Back
Top