Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Reports / Printing / March 2008

Tip: Looking for answers? Try searching our database.

Monthly Comparison by Year

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Supe - 06 Mar 2008 21:03 GMT
I have a query that gives my the date an item was shipped[Date], and the
quantity shipped[InvQty] by Store[Cust] by Item[UPC].  I want to create a
report that will give a monthly total for each item the last two years with a
separate year column so it would appear as below

  UPC1                 2007     2008
         January       100       200
         February     110         80
         Marcy         120

Assume I need a formular in the field under the years that would tell it to
only total the InvQty for the year 2007 or 2008.  Am I on the right track?
Duane Hookom - 06 Mar 2008 22:00 GMT
You could try a query like:

SELECT Cust, UPC, Month([ShipDate]) as MthNum,
Sum(Abs(Year([ShipDate]) = Year(Date())-1) * [InvQty]) as PrevYear,
Sum(Abs(Year([ShipDate]) = Year(Date())) * [InvQty]) as CurYear
FROM [Query that gives me...]
GROUP BY Cust, UPC, Month([ShipDate]);

Signature

Duane Hookom
Microsoft Access MVP

> I have a query that gives my the date an item was shipped[Date], and the
> quantity shipped[InvQty] by Store[Cust] by Item[UPC].  I want to create a
[quoted text clipped - 8 lines]
> Assume I need a formular in the field under the years that would tell it to
> only total the InvQty for the year 2007 or 2008.  Am I on the right track?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.