View Full Version : Averaging time differences


thatlem
06-26-2009, 11:38 AM
I have a calculation that subtracts two time values to come up with a difference in minutes. I want to take these minutes and generate an average difference in the reports. However I get an error indicating the calculation is to complexed.

I thought perhaps to create a new field in the query that takes the difference in minutes and convert to integer or similar, from which I could gernerate an average in the report - but that didn't work.

Any suggestions??? I really need to try and get an average for all the rows of minute differences.

thanks:confused:

ajetrumpet
06-26-2009, 02:38 PM
i would simply put a control on your report, and put something like this in the control source property:= (DSUM("Minute1 field", "YourTable") -
DSUM("Minute2 field", "YourTable")) /
DCOUNT("Any field in YourTable", "YourTable"The dcount takes the sum of all the differences, and divides that number by the number of records in the table. I would assume this would be fine.