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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

YTD and Inception To Date for a period prior to the current period.

Status
Not open for further replies.

PreetiGanamani

Programmer
Jan 2, 2006
22
US
Hello,
I need to calculate YTD and ITD amounts.

The YTD and ITD values have to be summarized for the GL period selected and earlier.Dates after the selected Period should not be included.

Can someone please help me out with a procedure of how to go about doing this.
 
I think you can just create a column using the Running Total function and then add a second column with a bit of code that that checks to see if the date is <= the selected date and if so display the YTD amount otherwise show zero

YTD = Running-Total([Amt])
Display = If ([Gl Pd] <= ?Selected Pd?)
Then ([YTD]) Else (0)

GL Pd Amt YTD Display
----- --- ------- -------
Sep05 100 100 100
Oct05 100 200 200
Nov05 100 300 300
Dec05 100 400 0
Jan06 100 500 0

Think that'll work, haven't checked it though; might be able to get it in to a single data item with a bit of pushing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top