Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculate avg not numeric exp.
Message
 
À
30/10/2002 15:48:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00717103
Message ID:
00717116
Vues:
26
The error came when diri_taux = 0 is the very first in the list, I believe. (Since the plain calc avg(diri_taux) works in this case, something is wrong with iif function itself).

This should give the result you need:
CALCULATE avg(diri_taux) for diri_taux#0 TO ni1

>Hi
>
>I have a problem with calculate. The first one is working the second return not a numeric expression. The two fields are numeric 3
>
>work _> CALCULATE avg(IIF(gest_taux = 0,.null.,gest_taux)) TO ni1
>
>fail -> CALCULATE avg(IIF(diri_taux = 0,.null.,diri_taux)) TO ni1
>
>A fellow worker also check without reply why this is not workiing !!!!!
>
>In fact this is a part of a big calculate that is not working because of the field diri_taux only.
>
> CALCULATE avg(IIF(gest_taux = 0,.null.,gest_taux)), sum(gest_recu), sum(gest_nbpos), sum(gest_nbneg), ;
> avg(IIF(diri_taux = 0,.null.,diri_taux)), sum(diri_recu), sum(diri_nbpos), sum(diri_nbneg) ;
> for LEFT(uni,4)="6040" TO ni1,ni2,ni3,ni4,ni5,ni6,ni7,ni8
>
>Any idea why fox is doing that.
>
>Tanks
>
>Michel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform