Can I subtract off of a count query?

J

Jugador5

I'm trying to calculate an average turnover off of a query that
automatically calculates one month's turnover. But, I must average this
in order give meaningful data for multiple month spreads, but can't get
a function to work.

I made a query that counts the number of months in the report (chosen
from a combo box on a form) and sums the turnover for each position.

But, since two months' data equals one month turnover, I need to
subtract one off of that count in order to divide the sum of the
percentages by it.

I'm a newbie, so can anyone help me figure out how to take one off of
that automatic count?


Thanks!
 
K

Ken Snell \(MVP\)

Because you haven't shown us the actual code or expression that you're
using, I cannot give you a specific answer. However, you can subtract 1 from
a Count value quite easily by putting "- 1" into the expression.

Give us more details (are you doing this in a query? are you doing this in a
textbox on a report? are you doing this in VBA code within the report? how
do you get the value of the count result? etc.) and we can provide a more
specific suggestion.
 
J

Jugador5

I'm working in a query, and I actually got it to work; why it hadn't
before is beyond me. But, after I did, I realized that I don't think
that I need it, since when I count the months, it only counts the
months that the result showed up, as opposed to the total number of
months searched from the combo boxes on the form.

Is there any way to count the total number of months searched within
the query? I actually need that data, because a month where the
turnover was 0 is still important data to average off of.

Again, thanks for your help!
 
K

Ken Snell \(MVP\)

You'll need to show us samples of the data, the SQL statement that you're
using now for the query, what the combo boxes are on the form and what data
they contain, and examples of what the result should be for some situations.
 

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