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

Trying to calculate simple Percentage

Status
Not open for further replies.

m3gd04

Technical User
Sep 17, 2004
17
US
Ok... newbie here with real bone head dillemma..

In short, I've created a report to simple show how many cases in my hospital were "late" or "ontime". I'm trying to express this as a percentage, yet in trying to do so, I keep on getting errors.


I first, created a new variable called STATUS:

it is defined as follows (shortened for simplicity sake):

= If <Description> InList ("A","B","C" etc...) And <Minutes>>0Then "Late" Else "On Time"

In my report, I want to show a simple % of whats "late" and whats "on time"

My formula for the subtotal is: =Count(<Case#>)
My formula for the total is: = =Count(<Case#>)


Here it is broken down into 2 columns and the following have been grouped by "Status" and subtotaled to show:


Status Case #:

Subtotal-> Late 140
Subtotal-> On Time 329
Total -> 469


In trying to create a variable to calculate the "On time" or "Late" %, I come up with calculation errors.

Ive tried " = if status = "On Time", then count (case#)/sum count (case#).

This should be a simple calculations, but its difficult to me. Any advice would be greatly appreciated.


thanks
 
Try:

count (case#)/(sum count (case#) in (<status>))








Ties Blom
Information analyst
 
Thanks blom0344,

i tried the suggestion, yet, i'm still getting error message. I'll tweak it and let you know what I come up with. But thanks for your suggestion.....
 
In a test report the following worked allright for me:

Code:
=count (case#) In (<STATUS>)/count (case#) In Block

Ties Blom
Information analyst
 
Hi Ties,

Once again, thanks so much for your help... got it to finally work...:))))
 
Well, you know how to mark a helpful post.... :)

Ties Blom
Information analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top