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!

totals and percent

Status
Not open for further replies.

OCM

MIS
Sep 12, 2002
220
US
greetings,

Given the following:

YEAR FT AD Total
2008 20 27 47
2009 20 26 46
2010 21 26 47

I was trying to get the % for each FT and AT:

e.g. FT/Tttal X 100 (20/47 = 42.55%) . 27/47 = 57.55& etc.

The formula I used below gives me "1" across the board:

=Count([Section ID]) / Sum(Count([Section ID])) * 100

TIA

OCM
 
Try:

FT/Total * 100 for the FT as a percentage of total, and AD/Total * 100 for the AD as a percentage of total.

Cheers
Pete
 
Pete, thanks.

Let me clarify a bit more: I’ve a variable called Type based on a condition it is either FT or AD. But, instead of displaying FT and AD in my report, I used

=Count([Section ID]) to get my numbers and
=Sum(Count([Section ID])) to get my totals

My question is how to get my formula working correctly?

I tried the following, but gives me a "1" all over my report

=Count([Section ID]) / Sum(Count([Section ID])) * 100 gives me “1”

TIA


OCM
 
Sorry, I am confused now. Can you provide a bit more information about the structure of the report (Grouping etc), and post the formulas you are using to return FT, AD and Total please.

Pete
 
For my variable, I use the following:

=If([Last Name] InList ( "Young" ; "Smith" ) ) Then "FT" Else "AD"
And when I drag my variable to my crosstab report, it displays similar to the following:

YEAR FT AD Total
2008 FT AD 47
2009 FT AD 46
2010 FT AD 47


To get the numbers & totals below, I used:

=Count([Section ID])
=Sum(Count([Section ID]))

YEAR FT AD Total
2008 20 27 47
2009 20 26 46
2010 21 26 47

Finally, to get the percentage I used the following which gives me “1”
=Count([Section ID]) / Sum(Count([Section ID])) * 100

TIA

OCM
 
Apologies if I am being dumb here, but I am struggling to understand how you are doing this, for example I am not familiar with a CR function called "InList", the CR function "In" requires square brackets and not round brackets, and I don't believe you can you nest Summaries as in "Sum(Count([Section ID]))", unless these are all additions from the latest version of CR which I have not used.

Please provide more information on exactly how you are getting to where you are, and provide exact code for the formulas you are using.

Some sample data and the resus you are expecting woud also assist.

Cheers
Pete
 
Actually, I’m using WebI XI 3.1. InList in WebI is like saying the following:

=If([Last Name]) ="Young" Then "FT" ElseIf([Last Name]) = "Smith” Then "FT" Else "AD" which gives me

YEAR FT AD
2008 FT AD
2009 FT AD
2010 FT AD

Since I wanted aggregate numbers, I use the following formula:

=Count([Section ID])
=Sum(Count([Section ID]))

To get:

YEAR FT AD Total
2008 20 27 47
2009 20 26 46
2010 21 26 47

My goal is to get the % for the above.

Regards,

OCM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top