Hello Nocton,
Originally I did not respond to this post because you did not say that you used Report Builder.
Also the average function has never worked.
Your comments however have prompted me to look again and I now see that the function 'AVERAGE' is available and working.
The problem though as you have discovered is that it does not handle NULL values.
I believe the code below will perform the function of averaging whilst also dealing with null values.
I have populated it with your field names.
1. Copy the code.
2. Open report for edit.
3. Drag out a text box in the detail pane.
4. If necessary hit F4 to show the properties pane.
5. Hit 'Data' tab.
6. Data Field Type = Field or Formula.
7. Click in the text box to right of Data Field
8. Press (Ctrl+V) to paste the code.
9. Hit 'Enter'
10. Execute report.
Code: Select all
(IF(ISNUMBER([HomeHcap1]);[HomeHcap1];0)+IF(ISNUMBER([HomeHcap2]);[HomeHcap2];0)+IF(ISNUMBER([HomeHcap3]);[HomeHcap3];0)+IF(ISNUMBER([HomeHcap4]);[HomeHcap4];0))/(ISNUMBER([HomeHcap1])+ISNUMBER([HomeHcap2])+ISNUMBER([HomeHcap3])+ISNUMBER([HomeHcap4]))
open office 4.1.14 & LibreOffice 6.4.4.2 x64 using HSQL 1.8.0.10 (Embedded) and HSQL 2.6.0 (Split) on Windows 10