Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Report Variable Average Exclude some values
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01237593
Message ID:
01237596
Vues:
18
>I have a report variable rm_Avg_Turn. The calculate option is set to average, and the Value to store is TurnMinutes. This all works great. The twist is that I want to print all records, but exclude from the average where the turnMinutes is greater than 60. I think in Value to store I could do an iif(turnminutes>60,0,TurnMinutes) but I also think that would ruin the average throwing a zero in.
>
>Any ideas?
>
>Thanks
>
>Kirk

How about two variables?
one (i.e. SumMins) -> calculation SUM->Value to store iif(turnminutes>60,0,TurnMinutes)
other (i.e. CntMins) -> calculation SUM->Value to store iif(turnminutes>60,0,1)
Then just divide SumMins/CntMins
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform