Hi everyone,
I am trying to execute some calculation for employees in query with IF but unable to reach the target.
My expression in query
IF
[EOSB_Entitle] equal to "Yes" and [ContractStatus]="Resigned"
than
Total days is less than 730 the result should show 0
Total days is greater than 730 but less than 1825 then result should be [Accrualdays]/3
Total days is greater than 1825 but less than 3650 then result should be [Accrualdays]/3*2
Total days is greater than 3650 then [Accrualdays]
otherwise
0
Any help here with above is much appreciated.
I am trying to execute some calculation for employees in query with IF but unable to reach the target.
My expression in query
Code:
IIf([EOSB_Entitle]="Yes" And [ContractStatus]="Resigned",IIf([TotalDays]<=729,IIf([TotalDays]<=1824,[AccrualDays]/3,IIf([TotalDays]<=1825,[AccrualDays]/3*2,IIf([TotalDays]>3650,[AccrualDays])))),0)
IF
[EOSB_Entitle] equal to "Yes" and [ContractStatus]="Resigned"
than
Total days is less than 730 the result should show 0
Total days is greater than 730 but less than 1825 then result should be [Accrualdays]/3
Total days is greater than 1825 but less than 3650 then result should be [Accrualdays]/3*2
Total days is greater than 3650 then [Accrualdays]
otherwise
0
Any help here with above is much appreciated.
Last edited: