Rule - Average of last three months calculated. Target is set as increase in 5% over the last three months average value. Whatever is achieved over the target amount, 3% is given as incentive for that amount (if target is 3 lakhs, if person achieves 4 lakhs, 3000 given as incentive)
How i can derive this scenarion in Backend script.