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

Dividing two summary fields in a Cross Tab Reprt

Status
Not open for further replies.

csneed

Technical User
Jul 1, 2010
1
US
I have a field that summarizes the total amount spent and another field that summarizes the total number of pieces bought. How do i divide those two fields together to return an average per piece inside the report? See the attachment for more information
 
can u insert a sub report to do the calculation and insert that below the total field or so in the main report ??
 
There are a couple of ways to do this here' sone that I have used in the past

For this to work you will need to create the same groups in your report as you have in your crosstab. If this is possible then you can create a formula to calculate the average price per peice at the lowest group level, in your case this would be group 3 (steve davis, tom jackson etc.) i.e.

(Sum({table.purchaseamt}, {group 3}) / Sum({table.qtyinvoiced}, {group 3}))

If you then add this formul ainto your crosstab an dchange the summary type to Average then this should give you the correct results.

HTH



Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top