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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculation question

Status
Not open for further replies.

mama16

MIS
Oct 22, 2004
125
US
Currently, I have a query that performs a Total division on a number for all the month. Like Sum([Tot_calls_by_Month])/([Months_Operational]) I want to create a query that'll ask the user for a specific Month ( I've already got that)but the number that I'd like to divide by is unknown to the user. It differs every month. In addition, some fields might be null, I'll like to exclude those. I want Access to pick the fields that contain data and divide those by x value
Any ideas?
 
Take a look at the Nz and IIf functions.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Perhaps you misunderstood my question,
There are about 24 records for the month of September
The field that I want to do a division, contains numbers such as 54,568 etc... There are some records that do not have any data in it (null)
This is what I put on the criteria "<> null". It gives me everything except for the null values. Good!
What I'd like for Access to do is once it does this
Total:SUM([Average_call_per_month]) I want Access to pick up the values that are not null and divide by that number. I can't tell Access to divide by 24 cause not all the 24 records contain data.

Please, help on this.

Appreciate it
 
Take a look at the diff between Count(*) and Count([field name])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I take that back, I need for all the states to show, if I exclude the nulls, certain states won't show.
How can I do this? Do it with the NZ function so it returns a value <> to null?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top