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

Calculating a percentage excluding duplicate values

Status
Not open for further replies.

chrisw82

MIS
Jan 23, 2014
1
GB
Hi,

I am trying calculate a percentage based on a sum of the sales made by various companies.

The issue that I am having is there are duplicates in the detail of the report that i cannot remove and need to be ignored in my calculation.

The result that I am trying to achieve is as follows:

Sales Share of Business
Company A £1,500 18.75%
Company B £3,000 37.5%
Company C £2,500 31.25%
Company D £1,000 12.5%

I have managed to calculate the total for each companies sales by creating this running total:

Field: sales
Type of Summary:Sum

Evaluate:

use a formula: next ({customer_ref}) <> {customer_ref}

Reset:

On change of group: Company

I have then tried creating the following formula to drop in the company group footer to try and calculate the percentage of sales:

Sum ({sales_running_total}, {company}) % Sum ({sales_running_total})

but i am getting an error saying this cannot be summarised.

Can someone please suggest an alternative solution.

Thank you in advance :)





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top