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

problem with running total need help 1

Status
Not open for further replies.

fsreport

Programmer
Mar 23, 2007
128
US
ms sql
cr 9.0
i have a running total that gives me a number
and i have a summary that need to be divided by this running total.
ex:
count amount
2 100
i need to have the amount divided by count
the summary is a sum(gross_amount,contact_id)
my running total is
distinctcount(contact_id)
evaluated on each record
reset on change of contact_id

how can i get this done??????????


fsreport
 
Your running total will always return a one, since you are resetting it on the field you are doing a distinct count of. Once you correct the running total, create a new formula:

sum(gross_amount,contact_id)/{#yourrunningtotal}

It is also unclear why you are using a running total for your distnctcount. You can probably just use another inserted summary.

-LB
 
thanks -LB
I did not have all the detail it's for a co-worker
i told him to sign up at tek-tips.
thank's a million


fsreport
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top