G
Guest
I've got a report that captures the following information...
("---->" indicates sub-grouping)
[Location]
------>--[testType] Can be one of several test types, where similar test
types are
grouped together. This can be either [xx], [y1], [y2],
[yInfinity] where all
the [xx] test types would be combined, and all the [y_] test types
would be
combined.... Each would be averaged separately from one another,
and
then the two averages would be averaged together. This field is
tied directly
to a table.
Here's the catch.... the [y_] test types can come in batches of
varying
amounts. These batches are based on dates. Therefore, the
batches
can contain any number of samples. These samples are batched
together
based on a sample collection date. In essence, the batches are
combined
to equal one test.
[testResults] of each test type, that should be grouped together,
are then
averaged, resulting in a daily average for each test type.
Again, there can
can be multiple (an unlimited number) results for similar test
types. This
is the average of the [xx] test types, and the average of the
[y_] test types,
averaged separately. Again, this field is tied directly to a
table.
[dailyAverages] of each test type are then averaged together, to
give a
monthly average, for the location. This is an unbound field.
--------------> Monthly average - the results of the multiple averages per
location as defined in the Test Type area above. This too, is an unbound
field.
----------------------------------------------------------------------------------------------
Right now I'm trying to group everything with IIf statements, but that is
not working. How can I separately combine the different test types,
accounting for the batches, prior to averaging them together, and then loop
back to grab those results and then average the averaged results together,
per location.... completely independent of other locations? Any help on this
isse will be greatly appreciated.
("---->" indicates sub-grouping)
[Location]
------>--[testType] Can be one of several test types, where similar test
types are
grouped together. This can be either [xx], [y1], [y2],
[yInfinity] where all
the [xx] test types would be combined, and all the [y_] test types
would be
combined.... Each would be averaged separately from one another,
and
then the two averages would be averaged together. This field is
tied directly
to a table.
Here's the catch.... the [y_] test types can come in batches of
varying
amounts. These batches are based on dates. Therefore, the
batches
can contain any number of samples. These samples are batched
together
based on a sample collection date. In essence, the batches are
combined
to equal one test.
[testResults] of each test type, that should be grouped together,
are then
averaged, resulting in a daily average for each test type.
Again, there can
can be multiple (an unlimited number) results for similar test
types. This
is the average of the [xx] test types, and the average of the
[y_] test types,
averaged separately. Again, this field is tied directly to a
table.
[dailyAverages] of each test type are then averaged together, to
give a
monthly average, for the location. This is an unbound field.
--------------> Monthly average - the results of the multiple averages per
location as defined in the Test Type area above. This too, is an unbound
field.
----------------------------------------------------------------------------------------------
Right now I'm trying to group everything with IIf statements, but that is
not working. How can I separately combine the different test types,
accounting for the batches, prior to averaging them together, and then loop
back to grab those results and then average the averaged results together,
per location.... completely independent of other locations? Any help on this
isse will be greatly appreciated.