Fiscal Quarters & Year

D

DDH

I am trying to group data by fiscal quarter (Q1=Jul-Sept, Q2=Oct-Dec, etc)
and fiscal year in Access 2003. Being a novice, I am at a loss after numerous
hours. Below is the SQL for the wizard generated quarter groupings which
works great but these are calendar year quarters.

SELECT DISTINCTROW Format$([Raw Collected Waste].Date,'\Qq yyyy') AS [Date
By Quarter], Sum([Raw Collected Waste].Oil) AS Oil, Sum([Raw Collected
Waste].HHW) AS HHW, Sum([Raw Collected Waste].[Yard Waste]) AS [Yard Waste],
Sum([Raw Collected Waste].Glass) AS Glass, Sum([Raw Collected
Waste].Aluminum) AS Aluminum, Sum([Raw Collected Waste].Magazines) AS
Magazines, Sum([Raw Collected Waste].[Mixed Ledger/Waste]) AS [Mixed
Ledger/Waste], Sum([Raw Collected Waste].Newspaper) AS Newspaper, Sum([Raw
Collected Waste].Cardboard) AS Cardboard, Sum([Raw Collected Waste].[HDPE
Colored]) AS [HDPE Colored], Sum([Raw Collected Waste].[HDPE Natural]) AS
[HDPE Natural], Sum([Raw Collected Waste].Pet) AS Pet, Sum([Raw Collected
Waste].[In-Plastics]) AS [In-Plastics], Sum([Raw Collected Waste].TotPaper)
AS TotalPaper, Sum([Raw Collected Waste].TotPlastic) AS TotalPlastic
FROM [Raw Collected Waste]
GROUP BY Format$([Raw Collected Waste].Date,'\Qq yyyy'), Year([Raw Collected
Waste].Date)*4+DatePart('q',[Raw Collected Waste].Date)-1;


Thanks for any advice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top