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

My user is a Health Dept with 4 Dis

Status
Not open for further replies.

csm2

IS-IT--Management
Dec 6, 2000
84
US
My user is a Health Dept with 4 District Offices. They want to know the Average Number of daily visits each nurse in each DO makes during a month. They also want to know the % Difference from DO average of each nurse's average, as well as % Difference from Departmental average (all DO's together).
The report will look something like this:

Nurse % Diff from % Diff from
D.O. Avg DO Avg Dept Avg
Smith, Joan 3.8 9.3 -2.2
|
|
DO Avg 3.5 -10.5

D.O.
|
|
DO Avg 4.4 14.1
|
|
|

Dept Avg 3.9

My question is: How do I get the % Difference figures for each nurse in the proper place in the report?
 
I'm not sure I understand what you're asking. I suspect that you're running into a problem because you need to compair the total for each nurse to the total for all nurses. And with running totals etc., Crystal will only find the overall total after it has shown the details.

On Crystal 8.5, you can get round this using a summary total, assuming you are grouping by District Office. Right-click on the value to be averaged, select [Summary] and select [Insert grant total field] and [Insert summary field for all groups]. This gives you totals that are worked out by Crystal before it decides what to print, so you could compair Nurse totals to the DO and District values.

Hope this helps.

Madawc Williams
East Anglia, Great Britain
 
I need to take the calculation another step further. I need to calculate:
the percentage difference from District Office average of each Nurse's individual average
and
the percentage difference from Departmental average of each Nurse's individual average.

I was given the following formulas to obtain these percentages:

1) % difference from District Office average = (DO Avg - Nurse's Avg) x 100/District Office average

2) % difference from Departmental average = (Dept Avg - Nurse's Avg) x 100/Departmental average

As you can see I have list each Nurse and calculate her Nurse Avg first, then calculate the District Office Avg and then the Departmental Avg. Then I have to calculate each Nurse's % differences from DO and Departmental averages and insert those figures on the same line as the Nurse name. And that is what is giving me the problems.

I have tried evaluating the % difference formulas using WhilePrintingRecords but they are not evaluating correctly at all. Also formula #1 always evaluates to "0" for the first Nurse listed for each District Office.

I hope I have defined the problem a little more precisely.
 
First group on Department, District Office, and then Nurse.
As long as you don't have any duplicate records, you should be able to use formulas like the following to be placed in the group (nurse) header:

{@diffDOAvg}:
(average({table.visit}, {table.nurse}) - average({table.visit}, {table.DO})) % average({table.visit}, {table.DO})

{@diffDeptAvg}:
(average({table.visit}, {table.nurse}) - average({table.visit}, {table.dept}))% average({table.visit}, {table.dept})

Then just format the formulas by clicking on the percentage sign in the toolbar.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top