Quarterly Date Sorting

D

danyellglfer

I have a report that has weeks from Jan-Dec.
I can get the report to group by Quarter... HOWEVER, WHen I try and show the
Quarter - it shows the FIrst Month in the QUarter not the last. How do I get
the last Quarter to show? For Instance I'd like the Report to say Quarter
Ending March 2007.
 
K

Klatuu

It would be helpful it you posted the code you are using now to get the first
month of the quarter, then we could modify it to return the last month.
 
D

danyellglfer

I'm not sure what you mean by "code" but these are the fields and how I
sorted the report:

Week Ending - Ascending Sorted
Code - Ascending Sorted
Job Name - Ascending Sorted
 
K

Klatuu

This expression returns the last date for a quater for a give date:
DateSerial(Year(Date), (((Month(Date) -1) \ 3) + 1) * 3 + 1, 0)

So If Week Ending is the date you want to use, it would be
DateSerial(Year([Week Ending]), (((Month([Week Ending]) -1)\3) + 1) * 3 + 1,
0)
 

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