Average ignoring zero [fixed]

I’m not totally sure if thats a bug or just a “missing checkbox”.

On my fitness chart I have plot values and the rolling averages of 7 and 60 days alongside.

I recently noticed, that those rolling averages only consider values above zero. Nothing (not set) and manually entering zero get ignored.

While that behaviour is helpful, there are times where I’d rather have all values (null as 0) going into that average.

Is there any chance that might just be an option for the chart that could be exposed to the UI with a checkbox?

That actually depends on what is being plotted. Some are flagged as “gauge: moving average only counts days with a measurement” (e.g. Resting HR). Others (e.g. Training load) include all days.

Are you plotting custom fields?

Yes. I defined beer and caffeine in liters and mg respectively and at least the beer ones only use the set values for the average

Edit: such a setting in the field options of my custom field would be okay as well if that is easier to implement

I added an option to control this:

So in my case I’d leave it unchecked?

Yes. It defaults to checked which is the current behaviour.

1 Like

Awesome. Now I’m happy :wink:

1 Like

Is it possible to change that for a non-custom field? Let’s say weight as I might not weight myself everyday and don’t see why 0 should affect the moving average. Actually, is it possible to change the weight so that it is flagged as “gauge: moving average only counts days with a measurement?

Thanks :slight_smile: