Denominator changes with each query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My report includes an average for each month. How can I use VBA variables
to determine the averages for any give period? (Detail, please ... this is
more complicated than I have done in the past. THANK YOU!)

1. Request the month ending date from the user (1/31/05; 2/28/05 ....)
2. Sum the total for each column (account type)
3. Count the number of stores for the requested time period

AcctType1 AcctType2
AcctType3

JAN 31, 06 $50,000 / 200 stores $65,000/200 stores $40,000/200
stores
Feb 28, 06 $55,000 / 183 stores $62,000/183 stores $33,000/183
stores
Mar 30, 06 $61,000 / 203 stores $65,850/203 stores $41,222/203
stores
 
A list of sotres are imported every month as well. I plan to use Count
Distinct query on the store list so the count function needs to be included
in the calculations.

Thank you, in advance, for your assistance.
 

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

Back
Top