I am using the statistical functions for Average, St Dev, etc. on a set of related records.

The user gets the option to exclude a record when it is an outlier and should not be included for the average calc., but the data has to remain in the set.

In the attached ERD, there is a connection based on the presence or absence of this marker.

However, this indeed does change the average, but it is not corrected for a reduced number of records to base the average on.

I do want to keep the raw data and statistical data in separate tables as I expect a very high number of raw data records.

Is there a better approach to this?

Any suggestions appreciated as I am stuck on this one.

Peter.

Create a calculation field like:

If ( AnalysisData::isOutlier ; "" ; AnalysisData::grammageCalculation )

Then do your statistical calculations on that field. Average and StDev ignore blank fields.