The avg() built-in InfoPath function takes a nodeset as an argument, that is, an xpath that evaluates to one or more nodes.
For example, if you have a repeating value /my:myFields/my:group1/my:group2/field1 (where group2 is repeating) then a xdMath:Avg(/my:myFields/my:group1/my:group2/field1) will return the average of values of each instance of group2/field1.
Your case is not different but you need to construct a nodeset based on your non-repeating nodes. This can be done by using the xpath OR operator |. For example, if your fields are called field1, field2 and field3, the formula to use will be:
xdMath:Avg(my:field1 | my:field2 | my:field3)
David Airapetyan / Software Services ArchitectQdabra® Software / Streamline data gathering to turn process into knowledge