### SummaryFunction (fld, condFld)

Basic and Crystal syntax.

##### Arguments

- fld is any valid database or formula field that can be evaluated by the function.
- condFld is any valid database or formula field used to group the values in fld.

##### Returns

Fractional Number

##### Action

SummaryFunction (fld, condFld) summarizes each group of values that is generated when the specified summary condition is met.

##### Typical uses

Use these functions whenever you want to duplicate, in a formula, a summary:

- that summarizes the values in a group
- that uses a String, Number, Date, Time, DateTime, or Currency field as the sort and group by (trigger) field.

##### Examples

The following examples are applicable to both Basic and Crystal syntax:

`SummaryFunction({orders.ORDER AMOUNT}, {customer.CUSTOMER ID})`

Summarizes the orders in each group of customer orders. The orders are separated into groups whenever the value in the Customer field changes.

`Count({orders.AMOUNT}, {orders.CUSTOMER ID})`

This formula counts the number of orders in each group of orders in the Amount field (the total orders for each month). The orders are separated into groups whenever the value in the Customer ID field changes.

`StdDev({orders.AMOUNT}, {orders.CUSTOMER ID})`

Calculates the standard deviation for the orders in each group of orders in the Orders field. The orders are separated into groups whenever the value in the Customer field changes.

`Sum({orders.ORDER ID}, {orders.CUSTOMER ID})`

Sums (totals) the orders in each group of orders in the Amount field. The orders are separated into groups whenever the value in the Customer ID field changes.

The following example is applicable to Crystal syntax:

`SummaryFunction({orders.ORDER AMOUNT}, {customer.REGION}) % SummaryFunction({orders.ORDER AMOUNT})`

Groups values in the Amount field by region, summarizes the values for each region group, and shows those values as a percentage of the summary value for the entire report.

##### Comments

In order to use this function to insert a group field in a formula, you must have already entered a group field in your report with identical parameters: same field, same sort and group by (trigger) field, same action (average, count, etc.).

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com