I have the following and the data will just be a sample:
ListPrice: 25675.00
UnitCost: 16688.75
SteelSurcharge: 3836.00
MarkupPercentage: Should be 25,655.93 but i keep getting the wrong Number. it keeps coming up with a higher number. My formacalc equation is below:
if (TotalSurcharge >0) then TotalSurcharge +UnitCost/1-MarkupPercentage else UnitCost/1-MarkupPercentage Endif.
All works fine with formula up until the markup percentage comes into play with the surcharge. Need help.
I found my answer I was missing () around a set of calcs:
if (TotalSurcharge >0) then (TotalSurcharge +UnitCost)/(1-MarkupPercentage) else UnitCost/1-MarkupPercentage Endif
This could be a big hint to the cause of the problem.
If it is off by 100 times the expected value, you will need to divide the MarkupPercentage by 100 to get the decimal value of the percentage.
If the value is the value expected from the previous entry, the field calculation order may need to be changed.
George Kaiser