Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Average on footer with variable

edited July 2006 in General
It must be getting late or my brain is just failing me but I'm having
trouble trying to create an average on the group footer with a variable. I
can produce a sum but I'm having trouble creating an average based on a set
criteria. Here's what I'm getting:

Day Deliveries

Mon
Tue 1
Wed
Thu 2
Fri
Sat 5
Sun 4

Sum = 12
Average on days where deliveries occur = 3 (4 days - 12 deliveries)

My problem is that my average is using all 7 days instead of the 4 and gives
me an average of 1.71 instead of 3. I've tried a number of different
variables with no luck.

Any ideas?

Comments

  • edited July 2006
    you can use a normal variable to count your days with day>0 in the detail
    band. Make int invisible and use it as an integer tyoe. So you can use DbSum
    in your footer of your group. Make this also invisible and use another
    variable to show the result as a division of both values.

    chris
    www.eulanda.it
    ERP Software
    Con tecnologia avanzata


  • edited July 2006
    Thanks. Why didn't I think of that?

This discussion has been closed.