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

Percent Summing

Status
Not open for further replies.

crzycrystlgrl

Technical User
Nov 6, 2004
20
US
Hi and thank you in advance
I use CR9 and SQL.
I am trying to sum up percents for a specific period of time. Mainly what percent of my payments have come in by the average week calculated by total payments by week.

EX:

GROUP #1MEDICARE

week 4 10000 26%
week 5 20000 53%
week 6 5000 13%
week 7 2000 5%
week 8 1000 3%

TOTAL MCR 38000 100%


Since the median weeks to collect payment would be approx 5 weeks
I want to sum up the percents to 79% (week 4 + 5)
but have been unsuccessful in producing a formula for doing so....I did try the PercentofSum function...however does not provide adding or running total capabilities

Any thoughts would be greatly appreaciated!
Cynthia


 
You should have supplied info about your fields and whether what we are seeing in your example is detail or summary data. Assuming these are group summaries, what you want to do is:

whileprintingrecords;
numbervar percentx;

if <week> in [4,5] then
percentx := percentx + <x%>;

Then use a display formula like the following in the report footer:

whileprintingrecords;
numbervar percentx;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top