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!

Formula for Cumulative Percentages in Crystal Reports 2008

Status
Not open for further replies.

IneedHelp01

Programmer
Feb 17, 2010
8
US
I need a formula that gives me Cumulative Percentages.
the first column is the Group Name and the second column is the count of the first column then the third is the percentage of the count of the first column (you can view in the attachment). So I need a formula to make the last column into Cumulative Percentages....so
1 Day or Less 17%
2 Days 45%
3 Days 73%
4 Days 88%
5 Days 94%
6 Days or More 6%

Any help would be appreciated...Hopefully I was clear. Thanks!
 
You could just do a running total {#cnt} that does a count of the unnamed field, evaluate for each record, reset never, and then use a formula like the following in the group footer:

{#cnt} % count({table.field})

-LB
 
Cool! Thanks! but is there a way where it doesnt add the last column because the 6 days or more column should stay at 9 because it does not include the other 5 columns in it so it will read like this...

1 Day or Less 17%
2 Days or Less 45%
3 Days or Less 73%
4 Days or Less 88%
5 Days or Less 94%
6 Days or More 6%

I know how to do all this in excel but the crystal formulas (syntax?) are a lil different
 
 http://i899.photobucket.com/albums/ac195/crystalhelp/CREX1.jpg
What is the content of the formula you are grouping on? You could possibly use:

if {table.group} <> "6 Days or More" then
{#cnt} % count({table.field}) else
count({table.field},{table.groupfield}) % count({table.field})

...or at least this logic. In the future please identify your columns by name. I also don't know what kind of summary you are using for the unnamed field--count/sum, etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top