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!

Crystal 8.5 calculate % in cross tab

Status
Not open for further replies.

fellrunner

Technical User
May 11, 2005
2
GB
I am using a cross tab to show our workforce gender split. The cross tab works fine and automatically totals. - Great.
However, I want to express the separate male/female figures as a percentage but cannot crack the formula.

Instinct tells me it should be quite straightford but I have a blind spot to it. Any offers would be much appreciated.
 
It's not that straightforward in 8.5. You can try Shelby's solution which is explained in detail by Ken Hamady in thread149-769395 or you can use a SQL expression as shown toward the end of thread767-903721.

-LB
 
Thanks LBass for your helpful response and signposts to the relevant threads.

I had no idea it would involve the degree of work around required.

I have had a stab at setting up the three numeric columns as in kenhamady's thread but I think i am misunderstanding something.

1 The field that totals all records named @denominator
seems ok. (it puts a 1 in the column if the record exists)

2 The conditional column formula (@count females)works in the same way. (puts a 1 in column if gender = woman)

3 The percentage field is confusing me.
I have used formula:
if ({@count females}) > 0
then
({@count Females}) / sum({@denominator}) * 100
else 0

The formula puts a suitably small percentage figure against each female ok but will not display in 'available fields' pick list to add it in to the cross tab as a 'summarised field'.

I cannot work out why. It would be good if someone could shed a little light to a gloomy kind of day.

Many thanks

Fellrunner
 
Please see the following article in Ken Hamady's newsletter, which provides a little more detail.


You should not be using a summary in any of the three formulas. If you need further help after reading the article, please supply all formulas that you are using.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top