I have this situation and I will appreciate any help:
I have table with 4 fields.
DispValue, Max , Min and month
I want to write a formula to count the fields for every month with that condition:
If Max is null use the DispValue field with condition that it is not < that the Min field
If Min is Null use the display field with condition that it is not > than the Max field
Dim x,v,w,z
x=0
z=0
for x=0 to count({all the record})-1
if isnull({Max}) then
v={DispValue}
else
v={Max}
end if
if isnull({Min}) then
w={DispValue}
else
w={Min}
end if
if {DispValue} < w or {DispValue} > v then
z=z+1
else
z=z
end if
next
formula=z