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 / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

Sum Months with Previous Year Totals

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Supe - 27 Feb 2007 20:48 GMT
I have a table that has data from July 2005 though the end of 2006.  I
created a report that sums the totals by month.  I tried to create a YTD
Total in the footer that would only give the total for 2006 of the months
that 2005 had shipments in.  So only would total July 2006 - December 2006.  
I entered the formula =Sum(IIf([2005]>0,[2006],0)), but this doesn't work
because if an item didn't have a sale in the month of 2005, it doesn't
include that item that 2006 month.  I have the monthly sales data in the
monthly footer.  Is there a way to tell it to say if the 2005 monthly total
is >0 then to sum all 2006 for that month?  Everything I've tried give me the
entire total for a months in 2006.
Al Campagna - 27 Feb 2007 21:45 GMT
Supe,
  Try adding these calculated fields in your report query...
  YearGrouping : Year(YourDate)     ...and...   YearMonthGrouping : Year(YourDate) &
Month(YourDate)
  Now the report can be grouped on
       YearGrouping Header
           YearMonthGrouping Header
               Detail............
           YearMonthGrouping Footer (w/totals)
       YearGrouping Footer (w/totals)

Signature

hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."

>I have a table that has data from July 2005 though the end of 2006.  I
> created a report that sums the totals by month.  I tried to create a YTD
[quoted text clipped - 6 lines]
> is >0 then to sum all 2006 for that month?  Everything I've tried give me the
> entire total for a months in 2006.
 
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.