You have two options you can explore: Average ( RelatedTable::Datafield ) and a summary field defined in the portal table that computes the "Average of" this same field.
Try using Average ( RightValues ( List ( Related Table::Field ), 5 ) ) to get the average of the last 5 values, and place it in a calculation field in the parent table.
Thanks guys managed to figure it average bit out
now I have the mean of the data in a field iam looking to somehow count them for instants is the data is > the mean 9 consecutive times a e-mail will be sent same if is < the mean 9 times in a row
what would be the best way to achive this? have two files BelowMean and AdoveMean and in a script something like
IF DataField > AverageField
SetField BelowMean 0
Else IF DataField < AverageField
SetField AdoveMean 0
Are would you recommend another way?
I think you need to explain what you are trying to do in more detail. "> the mean 9 consecutive times" is that a newly calculated mean each time or the original mean? If it's recalculated each time, what are the data sets used each time?
I'm guessing you may need to set up a relationship for this to keep track of the mean for each set of related records, but could easily be wrong here.
Giving an example of how you want this to work would help fill in some of the blanks.
Seems like you're on the right track. However, besides checking if the value of the field current record is above or below the mean, you also need to keep track of the previous value, i.e. whether the values are consecutive, and the number of times the value has been consecutive. Tracking these using variables would be better than creating fields. And, if the values are not consecutive, then all the variables need to be reset.