--- title: "Aggregates and Grouping" slug: "aggregates-and-grouping" updated: 2024-02-02T09:51:26Z published: 2024-02-02T09:51:26Z canonical: "kb.dataparc.com/aggregates-and-grouping" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.dataparc.com/llms.txt > Use this file to discover all available pages before exploring further. # Aggregates and Grouping One special thing to note about grouped sections is that it is not only for aesthetics. It also allows for aggregated values to be easily obtained. When values are aggregated, the value of a field in all detail sections (i.e. the records) below a section is taken into account. For example, only the 3 detail values are used to calculate the compliance number for the first tag, but all six detail values between the two tag groups in the Area 1 group make up the Area 1 compliance number. Aggregated values can be added to a pre-existing field through the **Text** property and selecting **Script Editor** or by clicking the **Calculated Fields** button as shown in the picture below. For more information on scripting, see the [scripting](/v1/docs/scripting) section of this document. ![](https://cdn.document360.io/59db2ca4-e512-446a-a143-a7c626447812/Images/Documentation/image101_003.jpg) The VBScript Editor that opens from the **Calculated Fields** button has built-in options to build the script (click the **Fields** button): ![](https://cdn.document360.io/59db2ca4-e512-446a-a143-a7c626447812/Images/Documentation/image103_004.jpg) And finally, adding **a Database Field** as an argument to the aggregate. A list of available fields is given by going to the **Database Fields** part of the **Fields** section shown above (just above **Script Functions**). An example is shown below where the average of the *KPI* field is being taken for a particular group: ![](https://cdn.document360.io/59db2ca4-e512-446a-a143-a7c626447812/Images/Documentation/image105_003.jpg) The control needs to be drawn in the report if the script is written from the ribbon bar.