Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mathmeticians, Please help!
Message
De
28/03/2000 05:50:06
Juan Kh
Dataprop Technologies
Sungai Petani, Malaisie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00350796
Message ID:
00351298
Vues:
27
Hi Larry,

I agreed with your approach, which make more sense. I guess what John was looking for or confused, is of which denominator to choose. If I ask a question where cost is 1 and price is 1.1, somebody would say the percentage is (1.1-1)/1, and some would say (1.1-1)/1.1 . I have seen both method beeing practised, Which would obviously cause a "ridiculous" gap between 300% and -75%!

Juan

>>>Hi John
>>>
>>>I'm neither an economist nor a mathematician. Exposure to business and accounting systems may be enough. Assuming the margin is the difference between the cost and the sales as a percentage of the sales price, doesn't this work?
>>>
>>>abs(tnPrice-tnCost)/tnPrice*100
>>>
>>>HTH
>>
>>I've already tried that. What is happening is:
>>
>>Assuming 2.00 cost and 8.00 price, the formula calculates the margin at 75%.
>>Assuming 2.00 price and 8.00 cost, the formula says its -300%.
>>
>>Shouldn't that be -75% in the second or am I not understanding the process or the math?
>
>Negative margins are valid, aren't they? How else can you calculate whether you are going in the whole or not.
>
>That said, how about:
>
>
round((tnPrice-tnCost)/tnCost*100,1)
>
>Price     Cost       Result
>8.00      2.00        300%   && made 300% above cost
>2.00      8.00        -75%   && lost 75% of cost
>
>HTH.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform