DAvg Formulla In Access Form

djwasim

Registered User.
Local time
Today, 05:51
Joined
May 29, 2009
Messages
93
Hello All

I am facing some problem when i using the DAvg Formulla
I have a Query Named Main Query. It contained data as...

Purchase Qty--Rate--Purchase Value---Issue Qty---Issue Value
-----50--------10------500----------------0----------0------
-----30--------15------450----------------0----------0------
-----0----------0--------0----------------15---------150----
-----50--------12------600----------------0----------0------
-----50--------13------650----------------0----------0------
-----0----------0--------0----------------12---------60-----
-----50--------10------500----------------0----------0------
-----0----------0--------0----------------20---------100----


Now I am using the DAvg Formull For calculating Average Rate as...
=DAvg("[Rate]","Main Query","[Itemname] = '" & [Itemname] & "'")

But the Result is showing the figure 7.5 (using to include zero values) instead of figure of 12 (excluding of zero values)

in short i want to get the results excluding zero values.

how is it possible?
Please help me:rolleyes:
 
Try this:
DSum("[Rate]","[Main Query]",{condition})/DCount(("[Rate]","Main Query", {condition}AND [Main Query].[Rate]<>0")
 

Users who are viewing this thread

Back
Top Bottom