Measuring days since last "relapse" using Beeminder

If I wanted to create a goal which tracked how many days it has been since I last did something I’m trying to stop (eating junk food, drinking alcohol, doing a bad habit etc.), would it be possible to do that? Like a Beeminder graph calculating days gone without junk food that goes back down to 0 if you order a takeout. I then want the bright red line to reflect that. Having a flat pink line when I do the bad habit (followed by it continuing to count from where I left off) gives over the wrong impression that I’m doing better than I am in reality. It might even be helpful to allow a certain amount of relapses every so often to prevent discouragement.

It’s a tough cookie. Any ideas?

Just to make sure I understand what you’re after, is it something like this?

So the red line is the thing you don’t want to cross, and the saw-tooth line is your progress - reaching different heights (different number of days in a row without failure) before falling off the wagon.

(1) is the flat line, (2) is the slightly increasing line, demanding longer runs each time.

Is this right? If not, feel free to post your own extremely careful and scientific drawing, just like mine


I thought I’d have a go at actually producing this in a goal, to see what it looked like. Here it is, with my first two days on in (or more, depending when you read this!)

This is a custom goal that works a bit like an odometer goal, but without the reset for entering a zero.

One thing that immediately struck me was that I can’t let the red line get above one - case (2) in my crude diagram above. Because if it does, when I fail in my streak and enter a zero, that would take me below the red line and cause a derail, but I need to be able to get out of the derail by entering a 1 the next day (first day of new streak). So the red line can only exist between zero and one, I think.

In principle, though, this all ought to work. So I’m going to let it run for a while at least, while I enter some test data, and see if anything else goes wrong :slight_smile:


This thread seems marginally related, and may have some interesting tidbits.

1 Like

Yes this is right. Sorry for replying 20 days late! Thank you for providing a solution in the form of the custom goal.

No problem! I also tried it as a simple do-more goal, with an extremely flat slope (you can start with a low slope like 0.1 units/day, and then immediately change the goal so that your target is to hit a value of 1, with a date 5 years hence).

This is slightly easier each day for data entry - just enter +1 - and to derail you need to find your current value (say, 10), and then enter negative that value for the derail day (so -10 in this example).

It’s also not a custom goal, just a standard “do more” goal, so you can set this up on the free plan.