.. index:: Core Operations; Aggregate Limit .. _core-operation-aggregate-limit: AggregateLimit ================================== Applies an aggregate attachment to the sum of a group of records that share equal values for their ``Trial`` field. It is applied incrementally to groups of records that share same values for ``Trial``, ``Time``, and ``OccurrenceKey`` fields. Once the attachment is applied, the result is proportionally allocated to all records in the group. Structure --------- .. code-block:: json { "_schema": "AggregateLimit_1.0", "limit": 1000, "currency": "GBP" } Parameters ---------- +----------------------+----------+------------------+---------------------------------------------------------+ | Parameter Name | Required | Type | Description | +======================+==========+==================+=========================================================+ | ``limit`` | Yes | ``double`` | The limit value in currency units. Cannot be negative. | +----------------------+----------+------------------+---------------------------------------------------------+ | ``currency`` | No | ``string`` | The currency in which ``limit`` is defined. | +----------------------+----------+------------------+---------------------------------------------------------+ Behaviour -------------- This is equivalent to :doc:`scoped_limit` with ``span_columns`` set to ``[]`` and ``erode_columns`` set to ``[Time, OccurrenceKey]``. In other words, it applies an eroding limit that erodes over the entire trial to occurrences generated by combining records with matching ``Time`` and ``OccurrenceKey`` values.