Expression in calculated control

Danielle

New member
Local time
Today, 22:46
Joined
Mar 24, 2000
Messages
6
I have the following in an expression in a control on a report, but the syntax is wrong.

=IIf[RESOURCE TYPE]="EMPLOYEE",[Sum Of BILLABLE HRS]/[Sum Of EXP HRS ALL],[Sum Of BILLABLE HRS]/[Sum of ACTUAL HRS]-[Sum of GA07 OTHER NON PAID]

Can you please tell me what is wrong? This expression should return a percentage.
 
Just missing a few parentheses:
=IIf([RESOURCE TYPE]="EMPLOYEE",([Sum Of BILLABLE HRS]/[Sum Of EXP HRS ALL]),([Sum Of BILLABLE HRS]/[Sum of ACTUAL HRS]-[Sum of GA07 OTHER NON PAID]))
 
Thanks! I tried that and the formula works if the Resource Type = Employee, but it didn't work if the Resource type was not employee. It gave a 0%. I don't know why. Do I need to add another IIf?
 
I just figured it out and it works. I had to add another set of parenthesis to the last calculation: ([Sum of ACTUAL HRS]-[Sum of GA07 OTHER NON PAID]).

So, it looks like this:

=IIf([RESOURCE TYPE]="EMPLOYEE",([Sum Of BILLABLE HRS]/[Sum Of EXP HRS ALL]),([Sum Of BILLABLE HRS]/([Sum of ACTUAL HRS]-[Sum of GA07 OTHER NON PAID])))

Thanks so much for your help!
 

Users who are viewing this thread

Back
Top Bottom