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

Percentage of Top N 1

Status
Not open for further replies.

jrennatc

Programmer
Aug 12, 2004
37
US
I'm working in Crystal 9. I have a Top N report where the business unit wants to see the Top 5 groups along with the percent of total records and the percent of top 5 records. I can get the percent of total, but can't seem to get the percent of top 5. The structure should look like...

Call Center 1
Top 1 Category Cnt of Cases % of Total % of Top 5
Top 2 Category Cnt of Cases % of Total % of Top 5
Top 3 Category Cnt of Cases % of Total % of Top 5
Top 4 Category Cnt of Cases % of Total % of Top 5
Top 5 Category Cnt of Cases % of Total % of Top 5
Other Cnt of Cases % of Total
Total Cases: Cnt of Total
Total Top 5 Cases: Cnt of Top 5


Data looks like
Call Center 1
Top 1 Category 15 30% % of Top 5
Top 2 Category 5 10% % of Top 5
Top 3 Category 4 8% % of Top 5
Top 4 Category 4 8% % of Top 5
Top 5 Category 2 4% % of Top 5
Other 20 40%
Total Cases: 50
Total Top 5 Cases: 30


Any ideas. Thanks in advance for the help.
 
You will have to create a similar report which list the top N values and use a running totals field to get the total of these. Design the report just to show the grand total if you wish.
This report should be added as a subreport to your existing report's report header(make it as small as you like)
Use a shared variable in a formula in the subreport footer to hold the grand total from the subreport.You will need to use WhilePrintingRecords in this formula.
In your main report, create formulas to calculate the % of top N and use the same shared variable to obtain the Top N total.
 
Worked great. I had to suppress all the subreport sections in order to hide it. Just trying to make it small with "Can Grow" off or suppressing the subreport made the shared variables = 0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top