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

Formula to calculate % of Goal 1

Status
Not open for further replies.

cyreports

Programmer
May 12, 2010
89
US
I need help creating a formula based off a sum of a field in my Group 3 Footer >>> (Sum of Data.Seen on Group 3). Per my client their goal is to see 25 patients per day, so the percentage needs to look at the sum of my field name 'Seen' and factor in the goal of 25 patients.

Example - (taking the 25 patient benchmark):

12 Patients were seen, I would expect to see in my results - 48% (i think ... quick math in my head, LOL).

If 25 patients were seen, I would expect to see 100%. The question now is if they see over 25 patients, can I get both coding scenarios to give me a percent over 100% and a way to make it say if over 25 just give me 100%? Not sure if thats do-able or not.

Any help is appreciated!
 
This will give you a percent over 100%:
//{@percent seen over 100}
(sum({table.Seen}, {table.GF3})/25)*100

This will give you 100% if it's over:
//{@percent seen = 100}
if (sum({table.Seen}, {table.GF3})/25)*100 > 100
then 100
else (sum({table.Seen}, {table.GF3})/25)*100

Put them both in GF3.

-DJWW

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top