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 Mike Lewis 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 withing a grouping

Status
Not open for further replies.

Jeremiah31

Programmer
Nov 7, 2006
31
US
In my report I created a grouping based on the store number. (There's 113 stores)

I have a formula column that determines if a service failure has occurred. The formula I'm using is:

Name of formula is Service Failure.
If {@WorkingDays} = {Sheet1_.DaysOut}then
"Yes"
Else
"No"

I'm trying to calculate the percentage of "Yes" within each store grouping. For example, store 100 has 15 total deliveries 12 Yes and three No. I need help creating a formula field to show 80%.
 
You should be able to get a percentage for the group using a Running Total. See FAQ767-6524 if you're not already familiar with them.

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Create a new formula {@svcfail}:

If {@WorkingDays} = {Sheet1_.DaysOut} then 1

Then create a second formula to place in the group header or footer:

sum({@svcfail},{table.storeno}) % count({table.storeno},{table.storeno})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top