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

average of part of data set

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
GB
I am using CR 2008

I am running a report on FX month end rates over several years. I show the data in the detail and in the ccy group show the average over the whole period - no problem

I also want to take the average over the last 3 month ends so how can I do this please
 
Use a Running Total:

Field to Summarise: FX Rate field
Type of Summary: Average
Evalute: Use a Formula (see below)
Reset: On change of Currency Group

For the Formula, use:

Code:
{Table.EoM_Date} > DateAdd("m", -3, CurrentDate)
[Code]

This assumes your {Table.EoM_Date} has a data type of "Date" (or "DateTime").  When run in June would average the rates as at the end of March, April and May.

Hope this helps.

Cheers
Pete
 
cheers this worked fine and has given me other ideas eg I paramatised the 3 so user can select any average period
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top