Applying an Aggregate Function to a Field

When you apply an aggregate function to a field, you are redefining how PeopleSoft Query uses the field throughout the query. Essentially, PeopleSoft Query replaces the field, wherever it occurs, with the results of the function. If you select the field as a display column, PeopleSoft Query displays the aggregate values; if you use the field as an order by column, PeopleSoft Query orders the results based on the aggregate values.

Note:

If you do not want PeopleSoft Query to redefine the field in this way—for example, if you want to display both the individual row values and the results of the aggregate function—create an expression that includes the aggregate function rather than applying the function directly to the field.

To apply an aggregate function to a field:

  1. Select Reporting Tools, and then Query, and then Query Manager.

  2. In Query Manager, select the Fields tab.

  3. Click the Edit button that is associated with the appropriate field.

    The Edit Field Properties page appears.

  4. Select the aggregate function that you want to use for this field, and click the OK button.

    The abbreviation for the selected function appears in the Agg (Aggregate) column. If a function is not available for the field that you have selected, the Edit Field Properties page does not close. For example, you cannot use Sum with a character field, but you can use Count, Min, and Max.

Note:

In addition to the previously listed aggregate functions, you can use any aggregate function that is supported by the underlying database by creating an expression component.

Related Topics