Hello,
I am struggling to write an expression.
I have a 12 month moving average amount which is already calculated. I now want to work out a bonus amount which will vary according to this moving avearge amount.
The bonus is:
Moving Increment Bonus %
Average
50000 20
1% per 1000
40000 10
1% per 1000
30000 0
1% per 1000
20000 0.9
2% per 1000
10000 0.7
I have tried using a IIf calculation as follows:
BonusAmt: IIf ([MovAve]<50000,20, IIf([MovAve]Between 49000 And 50000,19, IIf([MovAve]Between 48000 And 49000,18,IIf([MovAve]Between 47000 And 48000,17,IIf([MovAve]Between 46000 And 47000,16,IIf([MovAve]Between 45000 And 46000,15,IIf([MovAve]Between 44000 And 45000,14.......and so on.
The expression results in an error message because it is too long and complex.
Could someone provide some guidance on how I can achieve the desired result.
I am do struggle with code, so any examples would be appreciated.
Thank you.
I am struggling to write an expression.
I have a 12 month moving average amount which is already calculated. I now want to work out a bonus amount which will vary according to this moving avearge amount.
The bonus is:
Moving Increment Bonus %
Average
50000 20
1% per 1000
40000 10
1% per 1000
30000 0
1% per 1000
20000 0.9
2% per 1000
10000 0.7
I have tried using a IIf calculation as follows:
BonusAmt: IIf ([MovAve]<50000,20, IIf([MovAve]Between 49000 And 50000,19, IIf([MovAve]Between 48000 And 49000,18,IIf([MovAve]Between 47000 And 48000,17,IIf([MovAve]Between 46000 And 47000,16,IIf([MovAve]Between 45000 And 46000,15,IIf([MovAve]Between 44000 And 45000,14.......and so on.
The expression results in an error message because it is too long and complex.
Could someone provide some guidance on how I can achieve the desired result.
I am do struggle with code, so any examples would be appreciated.
Thank you.