> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m3ter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Global Aggregations

This topic explains how to create *Global Aggregations* to convert the usage data collected by your Global Meters into numerical measures:

* If you select a Global Meter as the target when you create an Aggregation, the Aggregation will be Global.
* You can then use the Global Aggregation as a pricing metric to set up usage-based pricing for Plans that belong to any Product.

<Tip>
  **Tips:**

  * **Create Global Aggregation from Meter Details**. You can create an Aggregation that will target a specific Meter Data Field or Derived Field directly from the **Meter Details** page. See [Creating Global Meters](/guides/usage-data-meters/creating-global-meters).
  * **Product-specific Aggregations?** You can also create Aggregations that are specific to a Product. For more details, see [Creating Product Aggregations](/guides/usage-data-aggregations/creating-aggregations).
</Tip>

<Warning>
  **Understanding Aggregation Options!** We *strongly recommend* that you review the options available for configuring Aggregations before you attempt to create them. See [Reviewing Aggregation Options](/guides/usage-data-aggregations/reviewing-aggregation-options).
</Warning>

## Creating and Managing Global Aggregations

**To create a Global Aggregation:**

1. Select **Metering>Aggregations**. The **Aggregations** page opens.
2. If there is a Product selected, clear the **Product** drop-down to show **(Global)**. The **Aggregations** page adjusts and lists any existing Global Aggregations, which are clearly labeled.
3. Select **Create Aggregation**. The **Aggregations>Create** page opens.
4. Configure **Aggregation** **Details**:

* Since the **Product** selection was cleared on the main **Aggregations** page, this shows **(Global)**.
* **Name**. (*Required*)
* **Code**. (*Required*)
* **Accounting product**. Use the drop-down to select a Product. (*Optional*)
  * For accounting purposes, you can use this to link to a specific Product any usage line items on Bills that result from pricing a Plan using this Aggregation:
    * If you've also defined an Accounting product for a Pricing that uses this Aggregation, then the *Pricing Accounting product* takes precedence and is used.
    * If no Accounting product is defined for a Pricing and you omit an Accounting product for the Aggregation, then the *Product the Plan belongs* to is used.

<img src="https://mintcdn.com/m3ter/f13HbMnZJAPh4iYI/images/1747054500-createagg68b.png?fit=max&auto=format&n=f13HbMnZJAPh4iYI&q=85&s=dd21385e452843390f1f3c693e8d754f" style={{ maxWidth:"min(450px, 100%)" }} width="648" height="525" data-path="images/1747054500-createagg68b.png" />

<Tip>
  **Tip: Check Product Drop-Down?** It's worth double-checking that the Product drop-down is cleared and shows **(Global)** before you continue.
</Tip>

5. Configure **Meter Settings**:

* **Meter**. Select the **Global Meter** whose **Data Field** or **Derived Field** you want to use as the basis for the Aggregation.
  * Note that only Global Meters will be available.
* **Target Field**. When you select a **Meter**, the **Target field** drop-down list automatically populates with the **Codes** of any fields set up on that **Meter**. For example, select **gb\_stored**:

<img src="https://mintcdn.com/m3ter/daiiRMWPVUZ0w-iK/images/1710778198-createagg69.png?fit=max&auto=format&n=daiiRMWPVUZ0w-iK&q=85&s=9c4d9cd5869b4f16838ecc6ff5796628" style={{ maxWidth:"min(450px, 100%)" }} width="651" height="269" data-path="images/1710778198-createagg69.png" />

6. Configure **Aggregation Settings**:

* **Aggregation**. Select the method for aggregating the data collected by the selected **Target field**. For example, if you want to use the summed value of gigabytes used, select **Sum**.
* **Unit**. For example, enter **gigabytes**. This will be used as a label for billing to indicate to your customers what they are being charged for.
* **Quantity per unit**. Enter the quantity by which you want to charge for the measured value. For example, if you want to charge your customers on a per-500 gigabytes used basis, enter **500**.
* **Rounding**. Specifies how you want m3ter to deal with non-integer, that is fractional number, Aggregation values. See [Reviewing Aggregation Options](/guides/usage-data-aggregations/reviewing-aggregation-options) for example. Four options:
  * **None**. Default
  * **Down**
  * **Up**
  * **Nearest**. Rounds up to the nearest half: 5.1 is rounded to 5; 5.5 is rounded to 6.
    * **Note**: Also used in conjunction with **Quantity per unit** setting. Rounds the number of units after the **Quantity per unit** has been applied. See [Reviewing Aggregation Options](/guides/usage-data-aggregations/reviewing-aggregation-options) for example.

<Warning>
  **Important!** When you create a Compound Aggregation that references a simple Aggregation, the Compound Aggregation calculation uses the *base value* of the simple Aggregation and before any **Quantity per unit** factor or **Rounding** defined for the simple Aggregation is applied.
</Warning>

* **Default Value**. If required, enter a default value to be used for the Aggregation if no usage-data is available from the selected Meter Target field:

<img src="https://mintcdn.com/m3ter/daiiRMWPVUZ0w-iK/images/1710778548-createagg70.png?fit=max&auto=format&n=daiiRMWPVUZ0w-iK&q=85&s=f362db1eacb1eac914f8220d9ea1c9c2" style={{ maxWidth:"min(450px, 100%)" }} width="651" height="660" data-path="images/1710778548-createagg70.png" />

<Warning>
  **Important!** If you intend to reference the Aggregation in a Compound Aggregation and the Aggregation might have null values because the Meter Target field fails to collect any usage data, then set **Default Value** to **0**. This ensures any null values from the simple Aggregation are passed in correctly to the Compound Aggregation with value = 0.
</Warning>

7. Configure **Segments**, if required. If you've set up non-numeric fields on the selected Meter and want to configure a segmented Aggregation using these, open the **Segments** panel. See [Segmented Aggregations](/guides/usage-data-aggregations/segmented-aggregations).
8. Add any required **Custom Fields** to the Aggregation. For more on Custom Fields, see [Adding and Editing Custom Fields](/guides/organization-and-access-management/viewing-and-editing-organization/adding-and-editing-custom-fields). We strongly recommend reviewing [Working with Custom Fields](/guides/creating-and-managing-products/working-with-custom-fields) before you create and use Custom Fields.

<Warning>
  **Important! Aggregation Custom Fields not supported for calculations**. Creating Custom Fields for Aggregations is intended to support financial reporting use cases. Although you can define Custom Fields at both the Organizational level and individual Aggregation level, they are not supported for use in Derived Field and Compound Aggregation calculations.
</Warning>

9. Select **Create Aggregation**. The **Aggregation Details** page opens - see [Reviewing Aggregation Details](/guides/usage-data-aggregations/reviewing-aggregation-details).
10. If you want to edit the Aggregation's details, select the **Edit** button, make your changes, and click **Update**.
11. If you want to remove an Aggregation, return to the **Aggregations** page and select the **Delete** button for the Aggregation:

<img src="https://mintcdn.com/m3ter/4PA7eaLaMtaA6FQv/images/1727272786-deleteicon2.png?fit=max&auto=format&n=4PA7eaLaMtaA6FQv&q=85&s=164e2bf3ef1032ad21cfed6fcd09a18a" alt="" width="31" height="29" data-path="images/1727272786-deleteicon2.png" />

A confirmation popup opens.

12. Select **Yes** to confirm the delete action.
