Calculate the average for a column of numbers

Microsoft Office InfoPath 2003

Show All Show All

Calculate the average for a column of numbers

Formulas are stored in fields and are displayed in the controls that are bound to those fields. When designing a form, you can create a formula that calculates the average for a column of numbers in a repeating table by using a text box, rich text box, or expression box.

Note  You should use an expression box only if you do not want to use the calculated average in another calculation or save it as part of your form, because expression boxes only display data and do not store it.

  1. In design mode, double-click the control where you want to create the average formula. The control should not be part of the repeating table.

    Note  To create the formula by using the field's properties, right-click the field in the Data Source task pane, and then click Properties.

  2. On the Data tab in the Control Properties dialog box, click Insert Formula Button image.
  3. In the Insert Formula dialog box, click Insert Function.
  4. In the Categories list in the Insert Function dialog box, click Math.
  5. In the Functions list, click avg, and then click OK.
  6. In the Formula box in the Insert Formula dialog box, double-click the text in parentheses.
  7. In the Data source list in the Select a Field or Group dialog box, click the field whose values you want to average. The column must be bound to the selected field, and the field itself must be a repeating field or part of a repeating group.

Note  The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed. Learn more