BradCustom
IS-IT--Management
Having a problem with a formula that I could use some help solving. Below is my formula that works for the sum of {@Hours}
What I would like to do with this formula is to add {@PTO} and {@Holiday} so that the subtotal adds Worked hours + PTO Hours + Holiday Hours by the Group Attendance.Work_Date
Here is one of the formulas I've tried.
When I check this code it says I am missing a ) so obviously it's not right. Any help would be appreciated.
Thanks, Brad
Code:
if {@DayofWeek}="Saturday" and Sum ({@Hours}, {Attendance.Work_Date})>12.5
then 5
else
(
if {@DayofWeek}in ["Monday","Tuesday","Wednesday","Thursday","Friday"]
and Sum ({@Hours},{Attendance.Work_Date})>17.5
then 8
else
Sum ({@Hours},{Attendance.Work_Date})
)
Here is one of the formulas I've tried.
Code:
if {@DayofWeek}="Saturday" and Sum ({@Hours}, {Attendance.Work_Date})>12.5
then 5
else
(
if {@DayofWeek}in ["Monday","Tuesday","Wednesday","Thursday","Friday"]
and Sum ([({@Hours},{Attendance.Work_Date},({@PTO},{Attendance.Work_Date}),({@Holiday},{Attendance.Work_Date})]),({)>17.5
then 8
else
Sum ([({@Hours},{Attendance.Work_Date},({@PTO},{Attendance.Work_Date}),({@Holiday},{Attendance.Work_Date})])
)
Thanks, Brad