# August 1, 2024 - Specify maximum values for the Counter block in Analytics Builder

**URL:** <https://community.cumulocity.com/t/august-1-2024-specify-maximum-values-for-the-counter-block-in-analytics-builder/11908>\
**Category:** Analytics\
**Tags:** Improvement, analytics, streaming-analytics\
**Created:** [March 17, 2025, 8:52am UTC](https://community.cumulocity.com/t/august-1-2024-specify-maximum-values-for-the-counter-block-in-analytics-builder/11908 "2025-03-17T08:52:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [March 17, 2025, 8:52am UTC](https://community.cumulocity.com/t/august-1-2024-specify-maximum-values-for-the-counter-block-in-analytics-builder/11908/1 "2025-03-17T08:52:17Z")

</div>

## Context

* * *

**Change Type:** Improvement  
**Product area:** Analytics  
**Component:** Streaming Analytics  
**Deployed at:** [eu.latest.cumulocity.com](http://eu.latest.cumulocity.com), [apj.cumulocity.com](http://apj.cumulocity.com), [jp.cumulocity.com](http://jp.cumulocity.com), [cumulocity.com](http://cumulocity.com), [us.cumulocity.com](http://us.cumulocity.com)

> **Technical details**
>
> **Build artifact:** apama-in-c8y (25.192.0)  
> **Internal ID:** PAB-4093

## Description

* * *

The **Counter** block in Analytics Builder has been updated to allow you to set a maximum value for each counter independently. This change was made because it was difficult and cumbersome to create periodic behavior in Analytics Builder, and it gives more control over counting in general.  
The following new parameters are available for this purpose:

- **Maximum Count** (input field)
- **Loop Count** (checkbox)
- **Maximum Number Same** (input field)
- **Loop Number Same** (checkbox)

The counter in question can then loop. Depending on the setting of the corresponding checkbox, the counter either resets its corresponding output port ( **Count** or **Number Same** ) to one, counting the first input after reaching the maximum value, or it stops counting when reaching the maximum value and must then be reset manually.  
For compatibility, the previous behavior remains as the default.  
Note that the **Reset** input port resets both counters. If this is a problem, you must use a separate **Counter** block for each counter.  
See the description of the [Counter](https://cumulocity.com/docs/streaming-analytics/block-reference/#counter) block for detailed information on the new parameters.
