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!

Using Dates/Arrays in Formulae 1

Status
Not open for further replies.

aap96126

Technical User
Apr 15, 2005
13
GB
Hi

I need to perform an operation for each month end date: find the total amount for records which satisfy certain criteria for each month, and stick these values in a table with the rows corresponding to each month end date. For example, sum all values such that

field1 <= monthenddate(x) and
field2 > monthenddate(x).

I can do it for one month at a time, but need some kind of loop to do it in a neat way for 16 consecutive months (i.e x=1 to 16).

I have tried to define an array in a formula but it doesn't seem to like this. Can anyone help me please?
 
You could create a formula that includes your conditions, as in {@someamts}:

if {table.status} = "X" then {table.amt}

If you group on {table.date} and set it to Print on change of month", you can then right click on {@someamts} and insert a summary at the group level.

To achieve a table appearance, you could insert a crosstab, use {table.date} as the row->group options->Print on change of month, and use sum of {@someamts} as the summary, no column field necessary.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top