PC Review


Reply
Thread Tools Rate Thread

Can I subtract off of a count query?

 
 
Jugador5
Guest
Posts: n/a
 
      29th Dec 2006
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!

 
Reply With Quote
 
 
 
 
Ken Snell \(MVP\)
Guest
Posts: n/a
 
      29th Dec 2006
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.

--

Ken Snell
<MS ACCESS MVP>

"Jugador5" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!
>



 
Reply With Quote
 
Jugador5
Guest
Posts: n/a
 
      29th Dec 2006
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!

 
Reply With Quote
 
Ken Snell \(MVP\)
Guest
Posts: n/a
 
      29th Dec 2006
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.
--

Ken Snell
<MS ACCESS MVP>

"Jugador5" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
subtract a single cell from range of cells and then count tworrall Microsoft Excel Worksheet Functions 8 16th Oct 2009 01:45 PM
Subtract 2 fields & count if <60 G. Microsoft Access Queries 12 15th Apr 2009 04:40 PM
How to count 2 datasets and then subtract the difference? Jon Microsoft Access Queries 2 28th Apr 2008 04:11 PM
how to get count(col1), count(col2), count(sol3) with only one query Mario Krsnic Microsoft Access Queries 2 27th Oct 2006 06:52 PM
Subtract query ? =?Utf-8?B?SmF5?= Microsoft Access Queries 1 13th Feb 2006 12:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:18 AM.