# Aggregation resets values

**URL:** <https://discuss.elastic.co/t/aggregation-resets-values/212282>\
**Category:** Logstash\
**Created:** [December 18, 2019, 8:40am UTC](https://discuss.elastic.co/t/aggregation-resets-values/212282 "2019-12-18T08:40:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![NewToThis](https://avatars.discourse-cdn.com/v4/letter/n/7ba0ec/32.png) [@NewToThis](https://discuss.elastic.co/u/NewToThis)\
**Post date:** [December 18, 2019, 8:40am UTC](https://discuss.elastic.co/t/aggregation-resets-values/212282/1 "2019-12-18T08:40:59Z")

</div>

Hello ladies and gentlemen,

I am doing a simple logstash aggregegation where I am checking specific values on a SQL table and whenever the this value is being found I am having a counter count up. In the end I am just doing another simple division on how many times I have counted that value to all the values on that day (the date is my task\_id) to see a percentage.

From the logical point of view the percentage will drop from 100% and will go down until the date resets.

The aggregation works every time I let logstash run through the whole SQL table at once.

But unfortunatly I does not work whenever logstash runs for a longer time and the SQL table gets constantly updated. Here I see that the percentage calculation is getting resetted from some reason on the same day (I see 100% more than once per day).

Any idea what could be the reason for that?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 15, 2020, 8:41am UTC](https://discuss.elastic.co/t/aggregation-resets-values/212282/2 "2020-01-15T08:41:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
