Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Financial Quarters 1

Status
Not open for further replies.

jcl5

IS-IT--Management
Dec 6, 2002
89
GB
I need a formula that will calculate calendar1stqtr as April-June 04 through to calendar4thqtr as Jan-March 05.

Can anyone tell me how to do this?

Thanks

jcl5
 
My standard long term solution is to build a period table to keep attributes for each day (such as Holiday, Financial quarter, etc.) as data warehouses do, but can't you simply group by quarter and then change the heading to reflect that the 2nd quarter is the first, etc.?

-k
 
That's ok for the first 3 quarters but q4 would in effect be q1 - or am I missing something?

I'm trying to do a summary report using conditional totals where one of the conditions is Q1=True.
I had wanted to build 4 formula fields for Q1-Q4 but can't get them to bring back the correct results. I can't work out how to use the range properly.
 
Try this:

Local NumberVar Quarter := DatePart("q",CurrentDate[/b);
If Quarter = 1 then Quarter := 4 else Quarter := Quarter -1;
"Q"&ToText(Quarter,0);

Replace the item in bold with your date field....

Reebo
UK

Please Note - Due to current economic forcast and budget constraints, the light at the end of the tunnel has been switched off. Thank you for your cooperation.
 
I am getting an error on the /b section saying a number,current amount, boolean etc is expected here.

Here is my formula:

Local NumberVar Quarter := DatePart("q",{Sales.Order_date}[/b);
If Quarter = 1 then Quarter := 4 else Quarter := Quarter -1;
"Q"&ToText(Quarter,0);

Thanks
 
I guess Reebo typoed. The formula should look like this:
Code:
WhilePrintingRecords;
NumberVar Quarter := DatePart("q",{Sales.Order_date});
If Quarter = 1 then Quarter := 4 else Quarter := Quarter -1;
"Q"&ToText(Quarter,0);
Naith
 
Thanks - works perfectly!
 
Sorry for not getting back sooner, and thanks Naith. I missed the ] of the TGML.

Thanks for the star jcl5, I'm feeling most appreciated![smile]

Reebo
UK

Please Note - Due to current economic forcast and budget constraints, the light at the end of the tunnel has been switched off. Thank you for your cooperation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top