Results 1 to 2 of 2
  1. #1
    Gryphoune is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2014
    Posts
    24

    Quarterly Report query keeps using prior year data

    I have a query to pull the quarterly totals for a specific criteria but it keeps pulling data from Q4 of last year even when I try to limit it to the current year (as shown below). Can someone show me where this is going wrong? Shouldn't a quarterly report automatically limit the data to the current year or does it always just use the last four quarters?

    TRANSFORM Sum([AUDIT NOTES].[ERROR AMOUNT]) AS [SumOfERROR AMOUNT]
    SELECT [AUDIT NOTES].PROPERTY, Sum([AUDIT NOTES].[ERROR AMOUNT]) AS [Total Of ERROR AMOUNT], Year([Record Added Date])=Year(Date()) AS Expr2


    FROM [AUDIT NOTES] LEFT JOIN PropertyGroups ON [AUDIT NOTES].PROPERTY = PropertyGroups.PropertyID
    WHERE ((([AUDIT NOTES].RESOLUTION)="chrg"))
    GROUP BY [AUDIT NOTES].PROPERTY, Year([Record Added Date])=Year(Date())
    PIVOT "Qtr " & Format([Record Added Date],"q");


    Thanks for any help.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    There is no criteria in the WHERE clause that limits records to current year.

    I don't think the GROUP BY criteria accomplishes what you want.

    But I don't use CROSSTABS and never seen GROUP BY on Boolean value, so could be wrong.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 06-25-2014, 08:01 AM
  2. Quarterly Satisfaction Report
    By DanRob in forum Reports
    Replies: 1
    Last Post: 04-25-2014, 05:42 PM
  3. Replies: 3
    Last Post: 07-17-2013, 05:51 PM
  4. Dsum data between to dates for this year and last year
    By sdel_nevo in forum Programming
    Replies: 1
    Last Post: 06-13-2013, 06:48 AM
  5. How to report data in fical year order
    By gemini2 in forum Reports
    Replies: 1
    Last Post: 05-27-2006, 06:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums