Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looking for a formula
Message
De
29/06/2001 18:12:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00525489
Message ID:
00525502
Vues:
16
>>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 :)

That is good as long as I have a table which would include 5 records with the total rates for each of them. In my case, I have a table which holds each individual rate, as we use that to verify for the user not to submit again, so the other solution proposed will work.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform