4 Replies Latest reply: Feb 7, 2014 7:20 PM by Paul Yeo

# How to make 430 / 0.65 = 661 ?

Hi All

may i know how to make my selling price = 661.5 ? now display as 656.5

• ###### Re: How to make 430 / 0.65 = 661 ?

Hi All

I forget to info , Table (A) have cal error only when user select TMY or TID or TTH.

When user select TSG the calculation is correct.

kindly use my below QV doc.

• ###### Re: How to make 430 / 0.65 = 661 ?

..because LAND_COST_TDS_SGD <> FOB_SGD_SUB*RATE_P*TRANSPORT_SUB*LESS for TMY

• ###### Re: How to make 430 / 0.65 = 661 ?

This formula gets you the 661.50:

floor(ceil(FOB_SGD_SUB*RATE_P/LESS,.5)/MARKUP_SUB, .5)

But I didn't use your field TRANSPORT_SUB cause I am not sure how this factors in. Also its not as perfect as 430/.65. The equation FOB_SGD_SUB*RATE_P/LESS gives you a decimal value, in which you use ceil to make it become 430 in the previous expression. However you didn't do any rounding to it in:

Ceil(FOB_SGD_SUB*RATE_P*TRANSPORT_SUB/MARKUP_SUB*LESS,0.5)

So it is using the decimal value and not the actual value 430 (also you are multiplying TRANSPORT_SUB to it in your equation, which is throwing your number off).

That is why I rounded, then divided:

floor(ceil(FOB_SGD_SUB*RATE_P/LESS,.5)/MARKUP_SUB, .5)

Also, the value is larger than 661.5, so if you use ceiling, it will round to 662 (which is why i used floor).

I can't be sure what numbers you are actually expecting.

Hope this helps!

• ###### Re: How to make 430 / 0.65 = 661 ?

Hi Jerem123

Yes , you very smart . now it work fine.  Doing QV like play chess game. Mind must be very clear and steady to cal every step move.  and then modify the expression as you wish. Last night i just cannot figure out how to make it work....

Many thank.

Paul