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!

Help with a Percentage formula in group footer 1

Status
Not open for further replies.

cyreports

Programmer
May 12, 2010
89
US
I need to calculate a percentage of patients that did not show up for their appointment in my Group 3 Footer.

I need to take the percentage based off the patients seen {ado.Seen} and ones that did not show based off my summary @Total No Show.

@Total No Show
Code:
{ado.NoShowOA}+{ado.NoShowPrevSched}

 
@percent

If sum({@Total No Show}, {group3field}) = 0 then 0 else
sum({ado.seen}, {group3field}) % sum({@Total No Show}, {group3field})

place this in group 3 footer

Ian
 
Ian,

I put this into my Group 3 Footer

Code:
If sum({@Total No Show}, {ado.GroupBy1}) = 0 then 0 else
sum({@Total Scheduled}, {ado.GroupBy1}) % sum({@Total No Show}, {ado.GroupBy1})

I changed the {ado.Seen} in this to my formula {@Total Scheduled}.

{@Total Scheduled} =
Code:
{ado.Seen} + {ado.NoShowPrevSched}

With my current formula, I am getting results that do not look right. Maybe I missed something?

Example - On one schedule, I had 7 appointments scheduled and 1 no show - my formula is returning a percentage of 700.00%. Not sure what I did wrong.
 
Your calc is the wrong way round

If sum({@Total Scheduled}, {ado.GroupBy1}) = 0 then 0 else
sum({@Total No Show}, {ado.GroupBy1}) % sum({@Total Scheduled}, {ado.GroupBy1})

Ian
 
Ian,

Thank you for the help! Worked like a charm!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top