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

Average In report Footer

Status
Not open for further replies.

Willie78

Technical User
Jun 4, 2004
67
GB
Hi all

I'm having a problem with a Report.

I'm calculating an average(avg) in a report footer on the score field below =avg([score])

ID Site Name Score
908 Site 1 88.43%
679 Site 2 86.53%
567 Site 3 84.86%
456 Site 4 84.66%
432 Site 5 0.00%

Average 68.90%

Now for the problem I know the Average is right but I want to exclude the 0.00% (it still needs to be shown on the report though). So the average would be 86.12%

Can you think of a way around this?

Thanks in advance

Paul


 
The following might work...
Code:
=DAvg("[Score]", "YourTableName", "[Score] > 0.00")
 
Or perhaps:
[tt]=Sum([Score])/Sum(IIf([Score]>0,1,0))[/tt]
 
Thank you

I'm not thinking straight today.

Cheers

Paul W
 

Willie,

I fully apreciate the "not thinking straight" thing.

But which solution worked??? Tell us. Teach us.


Tim

[blue]______________________________________________________________
I love logging onto Tek-Tips. It's always so exciting to see what the hell I
said yesterday.
[/blue]
 
Tim

They both worked I ended up using =Sum([Score])/Sum(IIf([Score]>0,1,0)). This was easier to explain to the person that I was doing the work for as they have used both of these functions before.

Cheers

Paul
 

Thanks Paul!

Tim

[blue]______________________________________________________________
I love logging onto Tek-Tips. It's always so exciting to see what the hell I
said yesterday.
[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top