# Request: New Aggregation Function: +1 if sum(day) \>= constant

**URL:** <https://forum.beeminder.com/t/request-new-aggregation-function-1-if-sum-day-constant/5707>\
**Category:** uncategorized\
**Created:** [August 28, 2019, 9:55pm UTC](https://forum.beeminder.com/t/request-new-aggregation-function-1-if-sum-day-constant/5707 "2019-08-28T21:55:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![narthur](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/narthur/32/5113_2.png) [@narthur](https://forum.beeminder.com/u/narthur)\
**Post date:** [August 28, 2019, 9:55pm UTC](https://forum.beeminder.com/t/request-new-aggregation-function-1-if-sum-day-constant/5707/1 "2019-08-28T21:55:25Z")

</div>

Hopefully the title is self-explanatory; please ask me to elaborate if it isn’t. I’d like to have this aggregation function for the linked use case:

> [@Edge Skating & Attention Fragmentation](https://forum.beeminder.com/t/edge-skating-attention-fragmentation/5667/10):
>
> Another potential solution occurred to me: Mirror data points from goal to new goal (IFTTT?) Set aggregation method to something like +1 if sum(day) \>= desired block size Unfortunately, such an aggregation method doesn’t yet exist, so, unless we can convince the Beeminder folks to add it, the steps would be more like: Make a goal with an aggregation function of nonzero Write a script that posts a +1 to the goal if the source goal’s daily sum \>= desired block size Put that script on a cron N…

---

<div class="post-metadata">

**Author:** ![adamwolf](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/adamwolf/32/484_2.png) [@adamwolf](https://forum.beeminder.com/u/adamwolf)\
**Post date:** [August 28, 2019, 10:07pm UTC](https://forum.beeminder.com/t/request-new-aggregation-function-1-if-sum-day-constant/5707/2 "2019-08-28T22:07:30Z")

</div>

Aggday functions currently don’t take any extra parameters, just the day’s datapoints.

---

<div class="post-metadata">

**Author:** ![dreev](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/dreev/32/4311_2.png) [@dreev](https://forum.beeminder.com/u/dreev)\
**Post date:** [August 28, 2019, 10:47pm UTC](https://forum.beeminder.com/t/request-new-aggregation-function-1-if-sum-day-constant/5707/3 "2019-08-28T22:47:11Z")

</div>

If you name that constant we could just hardcode a `narthur` function for guineapiggage 🙂

---

<div class="post-metadata">

**Author:** ![adamwolf](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/adamwolf/32/484_2.png) [@adamwolf](https://forum.beeminder.com/u/adamwolf)\
**Post date:** [August 28, 2019, 11:09pm UTC](https://forum.beeminder.com/t/request-new-aggregation-function-1-if-sum-day-constant/5707/4 "2019-08-28T23:09:23Z")

</div>

0.25, “atleastaquarter” 😛

---

<div class="post-metadata">

**Author:** ![narthur](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/narthur/32/5113_2.png) [@narthur](https://forum.beeminder.com/u/narthur)\
**Post date:** [August 29, 2019, 12:02am UTC](https://forum.beeminder.com/t/request-new-aggregation-function-1-if-sum-day-constant/5707/5 "2019-08-29T00:02:10Z")

</div>

lol I appreciate the willingness, but I’m not sure that’s a good idea, since I expect I’d want to use different values for different goals, and would probably want to be able to tweak the values to find the sweet spot for each goal…

---

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/philip/32/1505_2.png) [@philip](https://forum.beeminder.com/u/philip)\
**Post date:** [September 1, 2019, 1:15pm UTC](https://forum.beeminder.com/t/request-new-aggregation-function-1-if-sum-day-constant/5707/6 "2019-09-01T13:15:13Z")

</div>

> [@narthur](#):
>
> expect I’d want to use different values for different goals, and would probably want to be able to tweak the values to find the sweet spot for each goal

There’s the challenge right there. Changing aggregation method is possibly the most dangerous thing to do to a goal…

I’ve done it myself, and insta-derailed more than once, because of course the change applies to the whole history of the goal, not for just one segment of the road.
