Chart by Quarter Using the Chart Wizard in MS Access Report

S

SAP2

Hello,
I am using Access 2003 and I am trying to create a chart that displays the
last four completed quarters. When I use the wizard it displays the quarter
as 33 '08 (third quarter of 2008) and displays them consecutively as 33 '08,
44 '08, 11 '09, and 22 '09. SQL is:

SELECT (Format([FDR DT],"QQ 'YY")) AS Expr1, Count(qryFDR.MOrder) AS
CountOfMOrder
FROM qryFDR
GROUP BY (Format([FDR DT],"QQ 'YY")), (Year([FDR DT])*4+DatePart("q",[FDR
DT])-1);

If I change 'QQ' to 'Q' or 'q' it then places the quarters in numerical
order 1 '09, 2 '09, 3 '08, 4 '08.

Does anyone know a work around or an alternate way to display the quarters
where they will be displayed correctly (1 instead of 11) and in the correct
order?

Thanks.
 
S

SAP2

Please disregard my question. I believe I found my mistake. SQL should have
an order by:
ORDER BY (Year([FDR DT])*4+DatePart("q",[FDR DT])-1);
to keep the data in correct order.
 

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