Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for a formula
Message
 
 
To
29/06/2001 17:58:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00525489
Message ID:
00525496
Views:
25
>I'm looking for a formula. Assuming I have a rate of 1, 2, 3, 4, and 5. I then have 2 results for 3 and 2 results for 5. This would then give 4.00 as the rating result I am looking for. I'm looking for the formula which would give that rating.
select sum(Rate*Num) as TotalSum, sum(Num) as TotalNum from yourtable into cursor curResult

RatingResult=curResult.TotalSum/curResult.TotalNum
Fourth update :)
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform