Im trying to make a formula that calculates a housing tax.
If the purchase price is:
Up to £125,000 - 3%
£125,001 - £250,000 - 5%
£250,001 - £925,000 - 8%
£925,001 - £1.5m - 13%
over £1.5m - 15%
However it is calculated by first applying 3% to the first 125,000, 2% the next 125,000, then another 5% to the next range etc.
Sometimes a house will be split into more than 1 unit so the calculation is based on the purchase price of the whole building divided by the no of units and then totalled up again at the end.
I tried something along these lines but I guess my syntax is wrong.
var Number sdcalc = [Purchase Price] / [#Units] ;
if ($sdcalc < 125000, $sdcalc * 0.03, $sdcalc,
$sdcalc > 125000, $sdcalc * 0.02, $sdcalc,
$sdcalc > 250000, $sdcalc * 0.02, $sdcalc,
$sdcalc > 925000, $sdcalc * 0.05, $sdcalc,
$sdcalc > 15000000, $sdcalc * 0.02, $sdcalc);
When I get the sdcalc price here i will just then multiply it again by no of units to get the full tax.