Two ways that might help:-
1) Instead of using Average(field) try using two seperate fields Sum(field) and count(field).
2) Loop through the records via a script and create a running total and count of records.
Not guaranteed - but they are things that I would try. Thanks
Those methods work but they will take even longer to compute an average than: Average ( RelatedTable::Field )
You can look up aggregate functions in Help to learn why Average ( Field ) = Field
You could, however, define an "average" summary field. If you refer to it via the same relationship as you are using with the aggregate function, it will return the same value. Test it and let us know if that pops up your average more quickly. I've seen posts that claim that it is faster but haven't run any tests myself.
Another method would be to use Go To Related Records to pull up a found of these records first and then the Average summary field can return the same average.
When opening a layout using this field it takes forever
This should depend on your computer speed, record count and your concept of "forever".
Looping throught a script is invoking FMP script interpreter and a Summary is at machine speeds. In additon, careful on the Average calculation. Its use is based on fields having a Value. Test with empty fields to see if you obtain the Average Value expected.
Intresting, thanks. I changed the script so the active layout is related to the records I want average on.
I also noted zero is the same as nil/null/not set, which is quite weird. Good thing pointing that out.
"Forever" this time was about two seconds. :) Now it runs in the background with no plopping progress window every time the layout is opened, so nobody notice anything.
Actually, 0 should NOT be the same as Null values. Null values are omitted from these average calcaultions, 0 values are not.
Average ( 0 ; 1 ;2 ) = 1
Average ( null ; 1 ; 2 ) = 1.5
Note: My example is hypothetical not a valid syntax example.
BTW in my humble opinion, FMP and public in general, over uses the term AVERAGE and you must use it with caution for conclusions. Here is an example.... I want the average age of my remedial reading class students
You must use Standard Deviation to alert and inform. Case 1 SD=14.3... Case 2 SD=1.29
Now throw in Phil's NULL point.
If you put a value of Zero  for the 40 yr old since obviously he is "skewing" the results. 7,9,8,0,10 Avg= 6.8 SD=3.96
PS:They all are!! However using Stand Deviations to show how wide spread your data is and the Distribution is key to conclusions.
Good point about standard deviation.
And what we are calling "average" is what mathematicians/statisticians call the "mean" there is also the mode, the median and mid-range values--all different ways to look at your values in aggregate.
And then there are "weighted averages" that FileMaker can also compute...
But in a very large number of cases, simply using the Average function or an Average summary field to compute the mean is all that we really need so long as we understand the difference between 0 and null in how the result is computed.