General information
Category:
Coding, syntax & commands
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only