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!

Count rows and percentage in same column

Status
Not open for further replies.

heuresk

IS-IT--Management
Apr 2, 2003
6
US
Hi,

I have been trying to write a report that looks like this:
--------------------------------------------
Users Orders New Clients
--------------------------------------------
John 20 4
19%
Sarah 12 5
24%
Alex 50 12
57%
--------------------------------------------
Total: 82 21
--------------------------------------------

The 'Orders' field is a count of all the orders taken by each user, as well as the 'New Clients' field. And the difficult part is getting the percentage of each user's new client in the same column. I'm at a loss as to where to begin. Any suggestions would be immensely helpful.

Thanks in advance for your help.

Crystal 8.5; SQL DB
 
You can try putting the percentage in the group footer directly underneath the new clients count.

RH
PH : Users Orders New Clents (all labels)
GH1 : <users> <order count> <new client cnt>
D : ---suppressed---
GF1 : <new client %>
RF :
PF :



~Brian
 
A quick means is to right click the field that you want the percentage of (new or total, you didn't state which it was?) and select insert->summary->Count and check the Show as a percentage of for whatever field is of interest.

The other means would be to create a formula as in:

(count({table.field},table.group})/count({table.field}))*100

And then format the number to use a percent sign using the right click->Format Field->Number->Customize->Currency and change the symbol to a % and change the placement to after the number.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top