1 Reply Latest reply on Dec 7, 2011 2:29 PM by philmodjunk

Help on averageif...

Title

Help on averageif...

Post

I have a table which has hourly weather data of different cities. From those data I want to get the average of the hours between 6 to 17. I wrote a formula on a different table as; if( hour > 6 and hour < 17 ; Average( degree ). The relationship between 2 table is the month. But it didn't work out. How can I do it?

• 1. Re: Help on averageif...

Aggregate functions such as Average, Sum, Count.... compute the average of values in  list of values. If there is only one field listed, Average ( degree ), then this is the same as replacing it with just the field named degree as it is taking the average of a single value.

These functions work in three formats:

Average ( RepeatingField ) // the average of all values stored in different repetitions of the field

Average ( field1 ; field2 ; field3 )

Average ( RelatedtableOccurrenceName::FieldName )  // the average of value in FieldName for all records related to the current record

If won't work here as it on controls whether or not an average is computed not which values are included.

If you are keeping this all in one field, not using a separate related table, try this: