Question : Year to Year Sales Comparison Report

I need to pull out year comparisons from a qry qry_salesTracking.  I'm using an Access ADP project and have studied how you've done this report on regular access db's using the Sum(IIF... stuff, but this doesn't seem to work for ADP.  How would I do this?  Need to have a group SUM of sales totals ([Order total] for idcustomer, differentiated by the dtordered field by year.  This year, then this year -1 year, and -2.  It's how to use the ADP project that's throwing me off.  I get the query language to make this in Access, but not how to do it in ADP.  Thanks!!!  

Answer : Year to Year Sales Comparison Report

I object to deletion of this question, because there's no indication that the author has tried the suggested solution. Had he tried it, the code would be much smaller and more easily maintainable, such as:

SELECT a.Location, a.Category,
(select sum(value) from mytable where year=year(getdate()) -0 and a.location=mytable.location and a.category=a.category)  As ThisYearSum,
(select sum(value) from mytable where year=year(getdate()) -1 and a.location=mytable.location and a.category=a.category) As LastYearSum,
(...)
FROM MyTable a

Recommendation: PAQ/No refund.
Random Solutions  
 
programming4us programming4us