Summary Field tagging element

Use the Summary Field tagging element to perform aggregate calculations on a collection of data records from your Data Source. Summary Field tagging elements allow you to compute values such as totals, averages, counts, minimums, and maximums for a specified field within a record collection.

Prerequisites

Bind Summary Field tagging element to data

Before you can configure the aggregate function, bind the Summary Field tagging element to a collection of data records. For detailed steps, see Bind tagging element to data.

TIP

To use only select records from the collection, bind the Summary Field tagging element to a Power Fx expression using Filter function. An example of a filter expression to select only Quote Lines where Quantity is larger than 1: Filter(Quote.QuoteLines, Quantity > 1)

Configure aggregate function

Define which aggregate calculation to perform on the data collection.

  1. Select the Summary Field tagging element to view its properties.
  2. In the Properties pane, locate the Function property. Select one of the following aggregate functions from the dropdown:
    • Sum - Calculates the total of all values
    • Average - Calculates the mean of all values
    • Min - Returns the minimum value
    • Max - Returns the maximum value
    • StdDev - Calculates the standard deviation of all values
    • Count - Returns the number of records
    • First - Returns the first value in the collection
    • Last - Returns the last value in the collection
  3. Select Aggregate by to specify the value to aggregate. Choose a field or enter a Power Fx expression whose result will be aggregated. Use Ignore Nulls to control blank values: check it to skip blanks in the calculation, or clear it to include them.
  4. Select among predefined numeric and date time formatting options or enter custom format in Formatting property. Depending on the result type of the selected function:
  5. Review results in Live Preview pane.

Properties pane showing Summary Field tagging element properties including Function dropdown with aggregate options, Aggregate By property, Ignore Nulls checkbox, and Formatting property.

NOTE

Numeric and date-time formatting is driven by the Preview language selected in the Preview group on the Docentric ribbon tab. The same value may display differently based on the selected preview language culture settings.

Apply visual formatting

You can specify visual formatting rules on the Summary Field tagging element to control the visual appearance of related content in the generated document in a dynamic, data-driven manner. For detailed steps, see Apply visual formatting to tagging elements.

Next steps