2 Replies Latest reply on Sep 27, 2017 4:50 PM by Okechukwu Ossai Branched from an earlier discussion.

# Help with writing calcs.

Joe, - thanks a lot

I have another, I believe demanding question.

If i have a list of 3 roles  and 3 levels per roles - and based on a combo between these role and level - an employee could  get an entitlement to a car money  or overtime

role      level             car    overtime

a            a1               30         Y

b            b3               50         N

c           c6                30          N

1) how to add an if statement for each

2) then in my main database with all employee , how to do I add calculated field to see if the above rules are being adhered to

For example in my database I would have:

employee    role     level    car   overtime

RR                 a         a1      30       Y          (this should pass)

FF                 a          a1     100     Y           (this should fail since car of 100 is not inline with the above)

GG                a          a1      30      N          this should fail since overtime of N is not correct)

thanks

David.

• ###### 1. Re: Help with writing calcs.

Hi

I would like to make this possible with calculated fields- the rules will not change

thanks

David.

• ###### 2. Re: Help with writing calcs.

Hi David,

You can use the calculated field below.

[Company Rule]

IF [Role] = "a" AND [Level] = "a1" AND {FIXED [Employee]: MIN([Car])} = 30 AND [Overtime] = 'Y' THEN 'Pass'

ELSEIF [Role] = "b" AND [Level] = "b3" AND {FIXED [Employee]: MIN([Car])} = 50 AND [Overtime] = 'N' THEN 'Pass'

ELSEIF [Role] = "c" AND [Level] = "c6" AND {FIXED [Employee]: MIN([Car])} = 30 AND [Overtime] = 'N' THEN 'Pass'

ELSE 'Fail'

END

Hope this helps.

Ossai