Quarterly Sum

I

Impeesa

I have a table that has my financial results in the rows:
Month Type Amount
January Actual 100.
February Forecast 200

I then have a query that is building a summary of the results. My
columns are Current Month Actual, Current Month Plan, YTD Actual, YTD
Plan.... etc.

The last two colums I want to sum the current Quarter actual and
forecast vs. plan. I figured out what the sum needs to be:

Month Q Start Q End Act Start Act End Fore Start Fore End
1 1 3 1 1
2 3
2 1 3 1 2
3 3
3 1 3 1 3
0 0


The sequence repeats of course through the year. I could write twelve
IIF statements but I am hoping there is a smarter way. I was trying
to figure out a custom formula.

Anyway.... It I am trying to do this:

For January (input value from form prompt) sum January Actual and
February and March Forecast
For February sum January and February Actual and March Forecast
For March sum January, February, March Actual, no forecast.

My months are integers, driven from a input box that drives the entire
query. I cannot do a restrictive join table since it would mess up
the other calculations in the query.

Any ideas? Thanks in advance.
 

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