Forum Discussion
Payout Percentage Based on Achievement Percentage
- Sep 26, 2024
= IF(achieved<80%, 0, MEDIAN(achieved, 80%, 150%) / 40)
The discontinuity at 80% requires the test; the linear interpolation and the cap are handled by the MEDIAN function. If you use 365 a slightly messy formula can be concealed within Lambda
= PayoutPercentλ(achieved) where PayoutPercentλ = LAMBDA(_achieved, IF(_achieved<80%, 0, MEDIAN(_achieved, 80%, 150%) / 40) )
If the defined name 'achieved' applies to multiple values then the worksheet formula becomes
= MAP(achieved, PayoutPercentλ)
in order to return a dynamic array of results. I suspect you will wish to simply undo the defined name 'achieved' and use A1, but you do have other options.
= IF(achieved<80%, 0, MEDIAN(achieved, 80%, 150%) / 40)
The discontinuity at 80% requires the test; the linear interpolation and the cap are handled by the MEDIAN function. If you use 365 a slightly messy formula can be concealed within Lambda
= PayoutPercentλ(achieved)
where
PayoutPercentλ
= LAMBDA(_achieved,
IF(_achieved<80%, 0, MEDIAN(_achieved, 80%, 150%) / 40)
)
If the defined name 'achieved' applies to multiple values then the worksheet formula becomes
= MAP(achieved, PayoutPercentλ)
in order to return a dynamic array of results. I suspect you will wish to simply undo the defined name 'achieved' and use A1, but you do have other options.