Results 1 to 2 of 2
  1. #1
    DJF is offline Novice
    Windows 8 Access 2013
    Join Date
    Sep 2015
    Posts
    4

    Crosstab Fiscal Year on Year Query

    I have created a query in my database which shows year on year data by calendar year. However, I want to show it by fiscal year (running from 1 June to 31 May). So, for example, instead of 2014, 15, 16 etc, it will be 2014-15, 2015-16, 2016-17, 2017-18 and so on. Can someone please tell me how to do this? Below is how the query returns data (I have blanked out some personal information).



    Click image for larger version. 

Name:	query1.jpg 
Views:	14 
Size:	134.5 KB 
ID:	27408

    Currently the SQL is written as:

    TRANSFORM Sum(FINANCIALS.Net) AS SumOfNet
    SELECT FINANCIALS.[TYPE OF COST], Sum(FINANCIALS.Net) AS [Total Of Net]
    FROM FINANCIALS
    GROUP BY FINANCIALS.[TYPE OF COST]
    PIVOT Format([Date],"yyyy");

    But as a relative newbie to MS Access I am teaching myself as I go and i'm stuck on this.

    Hope you can help!!!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Create a 'report' table. In a form make a year textbox, txtYear, enter 2016.

    also have 2 text boxes, txtStartDate, and txtEndDate. These autofill when you enter the year. (using the afterupdate event)
    txtStartDate sets to the mm/dd/ & txtYear. Same with txtEndDate.

    put a button to run the append query, to pull all data from the main table and post to the report table.
    it will have an extra field , FiscalYr, from the query.

    continue with as many years as you want.
    when done, run the crosstab query against the report table.

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

Similar Threads

  1. Replies: 1
    Last Post: 10-14-2015, 03:45 PM
  2. New fiscal year dates
    By edieb in forum Programming
    Replies: 2
    Last Post: 05-13-2014, 08:42 AM
  3. Fiscal Year Tables and Relationships
    By Dorothy in forum Database Design
    Replies: 2
    Last Post: 07-19-2012, 08:52 AM
  4. Fiscal Year in Access 2007
    By blindhawkeye in forum Access
    Replies: 1
    Last Post: 08-16-2011, 02:38 PM
  5. fiscal year
    By RedGoneWILD in forum Programming
    Replies: 4
    Last Post: 08-04-2010, 01:38 PM

Tags for this Thread

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